1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 02:37:14 +00:00

🐵 prepare next version: improve the hero and mvc path parameters bindings

Former-commit-id: 0626b91c6448b5cebf1d04ee3f115cde68aa3d6d
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-03-02 19:48:53 +02:00
parent 78ab341862
commit bb66c10ad3
9 changed files with 122 additions and 69 deletions

View File

@@ -157,3 +157,9 @@ func Parse(src string, macros Macros) (Template, error) {
return tmpl, nil
}
// CountParams returns the length of the dynamic path's input parameters.
func CountParams(fullpath string, macros Macros) int {
tmpl, _ := Parse(fullpath, macros)
return len(tmpl.Params)
}