1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-16 02:22:15 +00:00

reduce the slicegrow

This commit is contained in:
astaxie
2015-12-16 23:43:32 +08:00
parent 29752e2575
commit dbc4ac6945
2 changed files with 7 additions and 4 deletions

View File

@@ -288,7 +288,8 @@ func (t *Tree) Match(pattern string, ctx *context.Context) (runObject interface{
if len(pattern) == 0 || pattern[0] != '/' {
return nil
}
return t.match(pattern, nil, ctx)
w := make([]string, 0, 20)
return t.match(pattern, w, ctx)
}
func (t *Tree) match(pattern string, wildcardValues []string, ctx *context.Context) (runObject interface{}) {