ipv6-test-backend/internal/router/router.go

18 lines
260 B
Go
Raw Normal View History

2024-08-17 08:31:47 +08:00
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())
2024-08-18 23:23:18 +08:00
g.Use(gin.Logger())
2024-08-17 08:31:47 +08:00
ipGroup := g.Group("ip")
ipGroup.GET("myip", ip.MyIP)
return g
}