mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 04:47:02 +00:00
new feature: handle different param types in the exact same path pattern
implements https://github.com/kataras/iris/issues/1315 Former-commit-id: 3e9276f2a95d6fc7c10fbf91186d041dcba72611
This commit is contained in:
@@ -20,6 +20,11 @@ type Template struct {
|
||||
Params []TemplateParam `json:"params"`
|
||||
}
|
||||
|
||||
// IsTrailing reports whether this Template is a traling one.
|
||||
func (t *Template) IsTrailing() bool {
|
||||
return len(t.Params) > 0 && ast.IsTrailing(t.Params[len(t.Params)-1].Type)
|
||||
}
|
||||
|
||||
// TemplateParam is the parsed macro parameter's template
|
||||
// they are being used to describe the param's syntax result.
|
||||
type TemplateParam struct {
|
||||
|
||||
Reference in New Issue
Block a user