mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:00: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 = "([^.]+).(.+)"
|
regexpStr = "([^.]+).(.+)"
|
||||||
params = params[1:]
|
params = params[1:]
|
||||||
} else {
|
} else {
|
||||||
for range params {
|
for _ = range params {
|
||||||
regexpStr = "([^/]+)/" + regexpStr
|
regexpStr = "([^/]+)/" + regexpStr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +254,7 @@ func (t *Tree) addseg(segments []string, route interface{}, wildcards []string,
|
|||||||
regexpStr = "/([^.]+).(.+)"
|
regexpStr = "/([^.]+).(.+)"
|
||||||
params = params[1:]
|
params = params[1:]
|
||||||
} else {
|
} else {
|
||||||
for range params {
|
for _ = range params {
|
||||||
regexpStr = "/([^/]+)" + regexpStr
|
regexpStr = "/([^/]+)" + regexpStr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user