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
I just ran into a bug / unexpected behavior when trying to diff and patch a complex struct with custom types. Not sure if this is out of scope or already covered by the documentation, but it would be great to get some feedback either way.
{map[key:[{value other}]]}
{map[key:[{value other} {valu2 othe2}]]}
[{create [Map key 1 Value] <nil> valu2 <nil>} {create [Map key 1 Other] <nil> othe2 <nil>}]
Have 2 errors
reflect.Set: value of type string is not assignable to type main.Map (cause count 0)
reflect.Set: value of type string is not assignable to type main.Map (cause count 0)
{map[key:[{value other}]]}
With diff.DisableStructValues(), I instead get:
{map[key:[{value other}]]}
{map[key:[{value other} {valu2 othe2}]]}
[{create [Map key 1] <nil> {valu2 othe2} <nil>}]
Have 1 errors
reflect.Set: value of type main.Inner is not assignable to type main.Map (cause count 0)
{map[key:[{value other}]]}
If I remove all the non-struct custom types, it works as it should.
The text was updated successfully, but these errors were encountered:
I just ran into a bug / unexpected behavior when trying to diff and patch a complex struct with custom types. Not sure if this is out of scope or already covered by the documentation, but it would be great to get some feedback either way.
This produces:
With
diff.DisableStructValues()
, I instead get:If I remove all the non-struct custom types, it works as it should.
The text was updated successfully, but these errors were encountered: