1
0
mirror of https://github.com/beego/bee.git synced 2024-11-21 23:50:54 +00:00

fix the typo

This commit is contained in:
astaxie 2014-06-23 23:16:06 +08:00
parent 763382e4ce
commit 5493f00cd0

View File

@ -71,13 +71,14 @@ func init() {
} }
} }
func urlReplace(src string) string { func urlReplace(src string) string {
pt := strings.Split(src, "/") pt := strings.Split(src, "/")
for i, p := range pt { for i, p := range pt {
if len(p) > 0 { if len(p) > 0 {
if p[0] == ':' { if p[0] == ':' {
pt[i] = "{" + p[1:] + "}" pt[i] = "{" + p[1:] + "}"
} else if p[0] == "?" && p[1] == ":" { } else if p[0] == '?' && p[1] == ':' {
pt[i] = "{" + p[2:] + "}" pt[i] = "{" + p[2:] + "}"
} }
} }