10 lines
360 B
Go
10 lines
360 B
Go
package common
|
|
|
|
import "github.com/gogf/gf/v2/net/ghttp"
|
|
|
|
// BindController 反射注册一组 controller 到路由组:接口 path/method 唯一来源为 dto 内嵌的
|
|
// g.Meta(携带 path/method/summary),禁止在 main.go 手动逐条注册。
|
|
func BindController(group *ghttp.RouterGroup, controllers ...interface{}) {
|
|
group.Bind(controllers...)
|
|
}
|