improve code quality

This commit is contained in:
byene0923 2021-04-15 14:44:57 +08:00
parent 140db01d4e
commit 305d220553

View File

@ -294,8 +294,8 @@ func (t *Tree) Match(pattern string, ctx *context.Context) (runObject interface{
func (t *Tree) match(treePattern string, pattern string, wildcardValues []string, ctx *context.Context) (runObject interface{}) {
if len(pattern) > 0 {
i := 0
for ; i < len(pattern) && pattern[i] == '/'; i++ {
i, l := 0, len(pattern)
for ; i < l && pattern[i] == '/'; i++ {
}
pattern = pattern[i:]
}