diff --git a/tree.go b/tree.go index 4f1da271..74d3e6b7 100644 --- a/tree.go +++ b/tree.go @@ -280,7 +280,8 @@ func (n *node) insertChild(numParams uint8, path string, fullPath string, handle panic("wildcards must be named with a non-empty name in path '" + fullPath + "'") } - if c == ':' { // param + // any wildcard is param + if c == ':' || c == '*' { // param // split path at the beginning of the wildcard if i > 0 { n.path = path[offset:i]