mirror of
https://github.com/astaxie/beego.git
synced 2025-07-03 13:30:19 +00:00
add util func to get the url fix #282
UrlFor(endpoint string, values ...string) string
This commit is contained in:
3
app.go
3
app.go
@ -87,6 +87,9 @@ func (app *App) AutoRouter(c ControllerInterface) *App {
|
||||
return app
|
||||
}
|
||||
|
||||
func (app *App) UrlFor(endpoint string, values ...string) string {
|
||||
return app.Handlers.UrlFor(endpoint, values...)
|
||||
}
|
||||
func (app *App) Filter(pattern, action string, filter FilterFunc) *App {
|
||||
app.Handlers.AddFilter(pattern, action, filter)
|
||||
return app
|
||||
|
Reference in New Issue
Block a user