1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 21:15:56 +00:00

Helpers for third-party adaptors and middleware authors to generate route paths without even know the router that has being selected by user

Former-commit-id: b21147f2bc306d5c41539a1be0c83456c3d62651
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-02-28 15:01:18 +02:00
parent b214df742b
commit 064282036c
8 changed files with 163 additions and 71 deletions

View File

@@ -74,6 +74,9 @@ func New() iris.Policies {
// finally return the path given + the wildcard path part
return path + wildcardPart
},
Param: func(paramName string) string {
return "{" + paramName + "}"
},
// Note: on gorilla mux the {{ url }} and {{ path}} should give the key and the value, not only the values by order.
// {{ url "nameOfTheRoute" "parameterName" "parameterValue"}}.
//