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:
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 {
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user