1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 03:00:49 +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 {
app.Handlers.Add(path, c)
func (app *App) Router(path string, c ControllerInterface, mappingMethods ...string) *App {
app.Handlers.Add(path, c, mappingMethods...)
return app
}
@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App {
return BeeApp
}
func Router(rootpath string, c ControllerInterface) *App {
BeeApp.Router(rootpath, c)
func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App {
BeeApp.Router(rootpath, c, mappingMethods...)
return BeeApp
}