1
0
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:
astaxie
2013-11-10 23:05:07 +08:00
parent 167ad203cb
commit 9446563e5b
6 changed files with 157 additions and 2 deletions

3
app.go
View File

@ -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