Closed maeglindeveloper closed 3 years ago
Having the same issue on map[string]interface{}
.
panic: reflect: call of reflect.Value.SetMapIndex on interface Value
@jinzhu any advice on this ? :)
@jinzhu the below line doesn't actually set to
's value to a map :
to.Set(reflect.MakeMapWithSize(toType, from.Len()))
Later, to.SetMapIndex(toKey, toValue)
causes panic, as to
is not of type map.
Any way to resolve this?
This should been fixed in latest version
Reproducible Example
https://play.golang.org/p/RJOgBhY1oGo
Description
Hi everyone,
I'm facing again a panic using the CopyWithOptions() method. See above the example.
It seems this is related to
map[x]interface{}
@jinzhu