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:
parent
538d39a704
commit
23deaedd39
8
beego.go
8
beego.go
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user