1234567891011121314151617181920212223 |
- package route
- import (
- "kpt-tmr-group/http/debug"
- "kpt-tmr-group/http/handler"
- "github.com/gin-gonic/gin"
- )
- func DebugAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
- return func(s *gin.Engine) {
- for _, opt := range opts {
- opt(s)
- }
- // Not Found
- s.NoRoute(handler.Handle404)
- debugRoute := authRouteGroup(s, "/api/v1/kpt/debug/")
- // kpt debug api
- debugRoute.GET("hello", debug.HelloOk)
- }
- }
|