mergo icon indicating copy to clipboard operation
mergo copied to clipboard

fix: `WithoutDereference` should respect non-nil struct pointers

Open joshkaplinsky opened this issue 3 months ago • 0 comments

This PR is a followup to https://github.com/darccio/mergo/issues/131 & https://github.com/darccio/mergo/pull/227.

The changes in this PR address the scenario where a non-nil struct pointer with WithoutDereference set will override the entire dst. This is unexpected, as a struct does not have a zero value; a non-nil struct should be traversed to determine merge behavior properly.

joshkaplinsky avatar Mar 12 '24 21:03 joshkaplinsky