package routers
import (
"beegoxiaomi/controllers/admin"
"fmt
"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
)
func init() {
ns :=beego.NewNamespace("/admin",
// 中间件
beego.NSBefore(func(ctx *context.Context) {
fmt.Println("执行")
}),
beego.NSRouter("/login", &admin.LoginController{}),
beego.NSRouter("/main", &admin.MainController{}),
)
beego.AddN