diff --git a/scope_strategy.go b/scope_strategy.go index 0c4bbad6..33b5b673 100644 --- a/scope_strategy.go +++ b/scope_strategy.go @@ -52,13 +52,12 @@ func WildcardScopeStrategy(matchers []string, needle string) bool { needleParts := strings.Split(needle, ".") for _, matcher := range matchers { matcherParts := strings.Split(matcher, ".") - if len(matcherParts) > len(needleParts) { continue } var noteq bool - for k, c := range strings.Split(matcher, ".") { + for k, c := range matcherParts { // this is the last item and the lengths are different if k == len(matcherParts)-1 && len(matcherParts) != len(needleParts) { if c != "*" {