mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Change isNotIn
Signed-off-by: Joshua Snider <jsnider@mtu.edu>
This commit is contained in:
parent
ff4fb41bdf
commit
9377f70840
1 changed files with 4 additions and 4 deletions
|
@ -180,7 +180,7 @@ func isIn(key []string, value []string) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// isNotIn checks if none of the values in S1 is in S2
|
||||
// isNotIn checks if any of the values in S1 is not in S2
|
||||
func isNotIn(key []string, value []string) bool {
|
||||
set := make(map[string]bool)
|
||||
|
||||
|
@ -190,12 +190,12 @@ func isNotIn(key []string, value []string) bool {
|
|||
|
||||
for _, val := range key {
|
||||
_, found := set[val]
|
||||
if found {
|
||||
return false
|
||||
if !found {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
func (in InHandler) validateValueWithBoolPattern(_ bool, _ interface{}) bool {
|
||||
|
|
Loading…
Add table
Reference in a new issue