refactor: simplify namespace exclusion logic #191

Merged
argoyle merged 1 commits from refactor-simplify-namespace-exclusion into master 2025-10-01 08:42:20 +00:00
+2 -6
View File
@@ -4,6 +4,7 @@ import (
"context" "context"
"flag" "flag"
"log" "log"
"slices"
"strings" "strings"
"time" "time"
@@ -91,12 +92,7 @@ func main() {
} }
func nsExcluded(name string, excludedNS []string) bool { func nsExcluded(name string, excludedNS []string) bool {
for _, ns := range excludedNS { return slices.Contains(excludedNS, name) || slices.Contains(excludedNS, "*")
if name == ns {
return true
}
}
return false
} }
func parseArgs() args { func parseArgs() args {