fix mapToUnstructured error message

This commit is contained in:
Jian Li 2021-12-02 18:07:16 +08:00
parent 0fe049cb93
commit 8689f22821

View File

@ -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()) {