mirror of
https://github.com/astaxie/beego.git
synced 2025-07-16 02:22:15 +00:00
5
tree.go
5
tree.go
@@ -213,6 +213,11 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
|
||||
} else {
|
||||
t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards})
|
||||
}
|
||||
for i, v := range wildcards {
|
||||
if v == ":" {
|
||||
t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards[:i+1]})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
seg := segments[0]
|
||||
iswild, params, regexpStr := splitSegment(seg)
|
||||
|
Reference in New Issue
Block a user