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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user