mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:00:54 +00:00
add UrlFor function but still improve
This commit is contained in:
parent
91c7635d0e
commit
0fb7d4babb
15
utils.go
15
utils.go
@ -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) {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user