Commit befeac5b authored by astaxie's avatar astaxie

Merge branch 'develop' of https://github.com/astaxie/beego into develop

parents 23bb36d3 4b52a381
......@@ -448,17 +448,11 @@ func (leaf *leafInfo) match(wildcardValues []string, ctx *context.Context) (ok b
// "/admin/" -> ["admin"]
// "/admin/users" -> ["admin", "users"]
func splitPath(key string) []string {
key = strings.Trim(key, "/ ")
if key == "" {
return []string{}
}
elements := strings.Split(key, "/")
if elements[0] == "" {
elements = elements[1:]
}
if elements[len(elements)-1] == "" {
elements = elements[:len(elements)-1]
}
return elements
return strings.Split(key, "/")
}
// "admin" -> false, nil, ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment