Files
bl/cool/controller-simple.go

28 lines
553 B
Go
Raw Normal View History

2025-06-20 17:13:51 +08:00
package cool
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
"github.com/gogf/gf/v2/util/gconv"
)
type IControllerSimple interface {
}
type ControllerSimple struct {
Prefix string
}
// 注册不带crud的路由
func RegisterControllerSimple(c IControllerSimple) {
var sController = &ControllerSimple{}
// var sService = &Service{}
gconv.Struct(c, &sController)
g.Server().Group(
sController.Prefix, func(group *ghttp.RouterGroup) {
group.Middleware(MiddlewareHandlerResponse)
group.Bind(
c,
)
})
}