0fb7d4ba by astaxie

add UrlFor function but still improve

1 parent 91c7635d
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 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!