Commit ddd9bf13 authored by Yongzheng Lai's avatar Yongzheng Lai

Update tree.go

parent 508a57be
......@@ -209,7 +209,7 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards})
}
for i, v := range wildcards {
if v==":" && i!=0{
if v==":" {
t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards[:i+1]})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment