1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:10:54 +00:00

add to beego

This commit is contained in:
astaxie 2013-07-25 15:50:16 +08:00
parent 538d39a704
commit 23deaedd39

View File

@ -133,8 +133,8 @@ func (app *App) Run() {
} }
} }
func (app *App) Router(path string, c ControllerInterface) *App { func (app *App) Router(path string, c ControllerInterface, mappingMethods ...string) *App {
app.Handlers.Add(path, c) app.Handlers.Add(path, c, mappingMethods...)
return app return app
} }
@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App {
return BeeApp return BeeApp
} }
func Router(rootpath string, c ControllerInterface) *App { func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App {
BeeApp.Router(rootpath, c) BeeApp.Router(rootpath, c, mappingMethods...)
return BeeApp return BeeApp
} }