-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overwriteWithEmptyValue is forced to true
when merging an object involving maps
#187
Comments
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. |
@liggitt I regret I'm unable to fix this in a quick way. Can you provide a PR? |
It looks like there is a bad bug in newer versions: - darccio/mergo#187 - kubernetes/kubernetes#101120 (review)
I forgot about this bug: - darccio/mergo#187
Fixing this in v2. |
hey @darccio I am curious about v2 timeline. I believe we're hitting this issue in kubernetes/kubernetes#121193 and it's not clear to me how to work around this behavior. |
@haircommander There is no planned timeline. I work on Mergo in my spare time. I will appreciate any help on this. |
#85 introduced a bug that can leave
overwriteWithEmptyValue
set to true if a map is encountered, but one of thecontinue
orreturn
statements is called before callingdeepMerge
(which reset tofalse
)https://github.com/imdario/mergo/blob/29fb3d3bdc5512887f1dc9aedde6a0fed407fa8f/map.go#L72-L100
#133 made the bug worse by removing the reset to
false
indeepMerge
, so now, any merge involving a map leavesoverwriteWithEmptyValue
set to true for all remaining merges.Upvote & Fund
The text was updated successfully, but these errors were encountered: