1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 20:50:49 +00:00

add UrlFor function but still improve

This commit is contained in:
astaxie 2013-11-08 18:20:08 +08:00
parent 91c7635d0e
commit 0fb7d4babb

View File

@ -373,3 +373,18 @@ func GetRandomString(n int) string {
}
return string(bytes)
}
// This will reference the index function local to the current blueprint:
// UrlFor(".index")
// ... print UrlFor("index")
// ... print UrlFor("login")
// ... print UrlFor("login", "next","/"")
// ... print UrlFor("profile", "username","John Doe")
// ...
// /
// /login
// /login?next=/
// /user/John%20Doe
func UrlFor(endpoint string, values ...string) {
}