ipv6-test-backend/internal/router/router.go
thehrz 063f32fcbb
All checks were successful
CI / deploy (push) Successful in 1m28s
feat: add ISP query
2024-08-20 13:38:32 +08:00

19 lines
288 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.GET("isp", ip.ISP)
return g
}