in pkg/options/patchtmpl/patch.go [366:383]
func convertToFloat(val interface{}) (float64, error) {
switch v := val.(type) {
case int:
return float64(v), nil
case int32:
return float64(v), nil
case int64:
return float64(v), nil
case string:
return strconv.ParseFloat(v, 64)
case float32:
return float64(v), nil
case float64:
return v, nil
default:
return 0, fmt.Errorf("%w; value %v with type %T could not be converted to float", floatConversionError, val, v)
}
}