1
0
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:
astaxie 2016-01-25 21:39:44 +08:00
parent f8004b69ad
commit 15e9ba19c0

View File

@ -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
} }
} }