-
-
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
Boolean not empty #166
Labels
Comments
Thanks for opening a new issue. The team has been notified and will review it as soon as possible. |
issue131_test maybe help you. |
GGabriele
added a commit
to Kong/mergo
that referenced
this issue
Feb 1, 2022
Mergo handles merges with zero-value fields as follows: 1. dst: true src: false -> dst: true 2. dst: nil src: false -> dst: false 3. dst: nil src: true -> dst: true 4. dst: false src: true -> dst: true In some cases (darccio#166) it may be desirable to change this default behaviour using a custom Transformer, for example to not overwrite 'dst' when it's already set to 'false' (or '0' etc). Unfortunately, in such cases (when dst holds a zero-value) no Transformers can be applied due to the way these are gated (darccio#166). Here we are changing how transformers are gated by using the isReflectNil function insted of isEmptyValue. Note that: - this change doesn't affect the default behaviour of mergo, as it only affects how transformers are gated - since custom transformers need to match data types in order to execute, this shouldn't affect any existing transformers either
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi im use this code
Log Printing
{Name:SDWAN-CLIENT-878 Enabled:true AutoNegotiation:true Speed:1000 FullDuplex:true FlowControlTx:true FlowControlRx:false}
I am waiting Field
Enabled
equalfalse
same as in the variablenewInterface
it's possible in mergo?
thanks.
The text was updated successfully, but these errors were encountered: