mirror of
https://github.com/astaxie/beego.git
synced 2025-07-03 13:50:20 +00:00
add func InsertFilter(pattern string, pos int, filter FilterFunc) *App to replace AddFilter
pos can be const: BeforeRouter = iota AfterStatic BeforeExec AfterExec FinishRouter
This commit is contained in:
5
app.go
5
app.go
@ -96,6 +96,11 @@ func (app *App) Filter(pattern, action string, filter FilterFunc) *App {
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) InsertFilter(pattern string, pos int, filter FilterFunc) *App {
|
||||
app.Handlers.InsertFilter(pattern, pos, filter)
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) SetViewsPath(path string) *App {
|
||||
ViewsPath = path
|
||||
return app
|
||||
|
Reference in New Issue
Block a user