github.com/astaxie/beego/router.go
中找到Router的入口
func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App {
BeeApp.Handlers.Add(rootpath, c, mappingMethods...)
return BeeApp
}
这里有个变长参数的语法。
这个变长参数
用的有点莫名其妙啊,莫非理解有误?先不明觉厉吧。
![](https://img.haomeiwen.com/i15383821/bb1dbfb67717ea22.png)
应该是一个bug?或者特性
?
![](https://img.haomeiwen.com/i15383821/34d83f273b18466e.png)
这个地方有优化的空间,可以做一次树压缩。
网友评论