package route import ( "github.com/gin-gonic/gin" ) type IndexHandler struct{} func (IndexHandler) GetPath() string { return "" } func (IndexHandler) GetMid() gin.HandlerFunc { return nil } func (c *IndexHandler) Routes(g gin.IRoutes) { g.Any("/stat", c.stat) } func (IndexHandler) stat(c *gin.Context) { c.String(200, "hello") }