mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Fixed string and float type mismatches
This commit is contained in:
parent
91de076363
commit
500e8d7e16
1 changed files with 1 additions and 7 deletions
|
@ -144,13 +144,7 @@ func validateMapElement(resourcePart, patternPart interface{}) error {
|
|||
|
||||
return validateArray(array, pattern)
|
||||
case string:
|
||||
str, ok := resourcePart.(string)
|
||||
|
||||
if !ok {
|
||||
return fmt.Errorf("expected %T, found %T", patternPart, resourcePart)
|
||||
}
|
||||
|
||||
return checkSingleValue(str, pattern)
|
||||
return checkSingleValue(resourcePart, patternPart)
|
||||
case float64:
|
||||
switch num := resourcePart.(type) {
|
||||
case float64:
|
||||
|
|
Loading…
Add table
Reference in a new issue