mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #106786 from kidlj/fix_mapToUnstructured_error_message
fix mapToUnstructured error message: should be 'map' instead of 'struct' being converted
This commit is contained in:
commit
e39d78e2c5
@ -722,7 +722,7 @@ func mapToUnstructured(sv, dv reflect.Value) error {
|
||||
dt = dv.Type()
|
||||
}
|
||||
if dt.Kind() != reflect.Map {
|
||||
return fmt.Errorf("cannot convert struct to: %v", dt.Kind())
|
||||
return fmt.Errorf("cannot convert map to: %v", dt.Kind())
|
||||
}
|
||||
|
||||
if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) {
|
||||
|
Loading…
Reference in New Issue
Block a user