19 lines
289 B
Go
19 lines
289 B
Go
package router
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"ipv6-test-node/internal/router/routes/ip"
|
|
)
|
|
|
|
func Register() *gin.Engine {
|
|
g := gin.New()
|
|
g.Use(gin.Recovery())
|
|
g.Use(gin.Logger())
|
|
|
|
ipGroup := g.Group("ip")
|
|
ipGroup.GET("myip", ip.MyIP)
|
|
ipGroup.POST("isp", ip.ISP)
|
|
|
|
return g
|
|
}
|