package routers import ( "Medical_ERP/controllers" beego "github.com/beego/beego/v2/server/web" ) func init() { ns := beego.NewNamespace("/api", beego.NSCtrlPost("/role-api", (*controllers.RoleApi).UpdateRoleApi), ) //注册 namespace beego.AddNamespace(ns) }