1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-15 04:41:01 +00:00

增加了文档和router函数

This commit is contained in:
xiemengjun
2012-12-16 00:34:45 +08:00
parent 9e428ba979
commit c1cac16073
2 changed files with 38 additions and 0 deletions

View File

@ -93,6 +93,21 @@ func (app *App) RegisterController(path string, c ControllerInterface) *App {
return app
}
func (app *App) Filter(filter http.HandlerFunc) *App {
app.Handlers.Filter(filter)
return app
}
func (app *App) FilterParam(param string, filter http.HandlerFunc) *App {
app.Handlers.FilterParam(param, filter)
return app
}
func (app *App) FilterPrefixPath(path string, filter http.HandlerFunc) *App {
app.Handlers.FilterParam(path, filter)
return app
}
func (app *App) SetViewsPath(path string) *App {
ViewsPath = path
return app