woj-server/internal/api/debug/handler.go

23 lines
384 B
Go
Raw Normal View History

2022-09-07 23:34:37 +08:00
package debug
import (
2022-10-20 16:50:19 +08:00
"github.com/WHUPRJ/woj-server/internal/global"
2022-09-07 23:34:37 +08:00
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
var _ Handler = (*handler)(nil)
type Handler interface {
randomString(c *gin.Context)
}
type handler struct {
log *zap.Logger
}
func RouteRegister(g *global.Global, group *gin.RouterGroup) {
app := &handler{g.Log}
group.GET("/random", app.randomString)
}