1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:00:54 +00:00

Update tree.go

go fmt
This commit is contained in:
Yongzheng Lai 2015-09-06 22:13:58 +08:00
parent 1377d16559
commit a2a6ec954b

View File

@ -209,7 +209,7 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards}) t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards})
} }
for i, v := range wildcards { for i, v := range wildcards {
if v==":" { if v == ":" {
t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards[:i+1]}) t.leaves = append(t.leaves, &leafInfo{runObject: route, wildcards: wildcards[:i+1]})
} }
} }