add UrlFor function but still improve
Showing
1 changed file
with
15 additions
and
0 deletions
| ... | @@ -373,3 +373,18 @@ func GetRandomString(n int) string { | ... | @@ -373,3 +373,18 @@ func GetRandomString(n int) string { |
| 373 | } | 373 | } |
| 374 | return string(bytes) | 374 | return string(bytes) |
| 375 | } | 375 | } |
| 376 | |||
| 377 | // This will reference the index function local to the current blueprint: | ||
| 378 | // UrlFor(".index") | ||
| 379 | // ... print UrlFor("index") | ||
| 380 | // ... print UrlFor("login") | ||
| 381 | // ... print UrlFor("login", "next","/"") | ||
| 382 | // ... print UrlFor("profile", "username","John Doe") | ||
| 383 | // ... | ||
| 384 | // / | ||
| 385 | // /login | ||
| 386 | // /login?next=/ | ||
| 387 | // /user/John%20Doe | ||
| 388 | func UrlFor(endpoint string, values ...string) { | ||
| 389 | |||
| 390 | } | ... | ... |
-
Please register or sign in to post a comment