1
0
Fork 0
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:
Maxim Goncharenko 2019-05-20 18:28:54 +03:00
parent 91de076363
commit 500e8d7e16

View file

@ -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: