Does beego have a way to create multi-level controllers?

such as admin/userController index/userController in php framework

how to create it in beego? I haven"t found any documents and instructions similar to this writing method for a long time

Mar.11,2022

Yes. Beego routing parses the request to a function. As long as this function implements the FilterFunc func (* context.Context) interface, you can put your controller logic anywhere


.

package routers

import (

)
"github.com/astaxie/beego"
"web/controllers"
"web/controllers/index"

)

func init () {

beego.Router("/", &controllers.MainController{}, "get:Index")
beego.Router("/index", &index.IndexController{},"get:Index")

}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38a56-4116f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38a56-4116f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?