Merge pull request #4577 from byene0923/develop

improve code quality
This commit is contained in:
Ming Deng
2021-04-15 16:30:14 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

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:]
}