You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panic: reflect.Set: value of type []interface {} is not assignable to type []string
However, the type of Values in map is actually []string, which is the same as that in struct, not only the []interface{}.
Additional:
mergo.WithAppendSlice has the similar problem too: mergo error: cannot append two slice with different type ([]interface {}, []string)
The text was updated successfully, but these errors were encountered:
Benyamin-Tehrani
changed the title
mergo.Map doesn't check the real Kind() of element when merging slices?mergo.Map doesn't deal with interface{} when merging slices?
Oct 5, 2024
It seems that
mergo.Map
doesn't process withinterface{}
when merging slices.Example:
Error:
panic: reflect.Set: value of type []interface {} is not assignable to type []string
However, the type of
Values
in map is actually[]string
, which is the same as that in struct, not only the[]interface{}
.Additional:
mergo.WithAppendSlice
has the similar problem too:mergo error: cannot append two slice with different type ([]interface {}, []string)
The text was updated successfully, but these errors were encountered: