1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-07 20:17:05 +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

@@ -545,6 +545,9 @@ func New() iris.Policies {
// finally return the path given + the wildcard path part
return path + wildcardPart
},
Param: func(paramName string) string {
return string(parameterStartByte) + paramName
},
// path = "/api/users/:id", args = ["42"]
// return "/api/users/42"
//