From 7fb850ef530b3445adb07406f8bc773e6ad38884 Mon Sep 17 00:00:00 2001 From: fazal Date: Wed, 24 Aug 2016 15:45:20 +0500 Subject: [PATCH] strategy: simplify scope comparison logic Signed-off-by: Mohamedh Fazal --- scope_strategy.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scope_strategy.go b/scope_strategy.go index 41e43f89..c8d24a8d 100644 --- a/scope_strategy.go +++ b/scope_strategy.go @@ -26,11 +26,9 @@ func HierarchicScopeStrategy(haystack []string, needle string) bool { } current := haystack[k] - if current == needle { - continue + if current != needle { + break } - - break } }