mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:40:54 +00:00
fix the range only used in Go 1.4 fix #1623
This commit is contained in:
parent
f8004b69ad
commit
15e9ba19c0
4
tree.go
4
tree.go
@ -141,7 +141,7 @@ func (t *Tree) addtree(segments []string, tree *Tree, wildcards []string, reg st
|
||||
regexpStr = "([^.]+).(.+)"
|
||||
params = params[1:]
|
||||
} else {
|
||||
for range params {
|
||||
for _ = range params {
|
||||
regexpStr = "([^/]+)/" + regexpStr
|
||||
}
|
||||
}
|
||||
@ -254,7 +254,7 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
|
||||
regexpStr = "/([^.]+).(.+)"
|
||||
params = params[1:]
|
||||
} else {
|
||||
for range params {
|
||||
for _ = range params {
|
||||
regexpStr = "/([^/]+)" + regexpStr
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user