ipv6-test-backend/internal/router/router.go
2024-08-20 13:44:00 +08:00

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
}