refactor: simplify namespace exclusion logic #191
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
"log"
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -91,12 +92,7 @@ func main() {
|
||||
}
|
||||
|
||||
func nsExcluded(name string, excludedNS []string) bool {
|
||||
for _, ns := range excludedNS {
|
||||
if name == ns {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.Contains(excludedNS, name) || slices.Contains(excludedNS, "*")
|
||||
}
|
||||
|
||||
func parseArgs() args {
|
||||
|
||||
Reference in New Issue
Block a user