-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
should not overwrite pointers directly, instead check embedded values… #120
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… and overwrite it
vdemeester
approved these changes
Jul 5, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐯
thaJeztah
added a commit
to thaJeztah/docker
that referenced
this pull request
Oct 6, 2019
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins
pushed a commit
to docker/docker-ce
that referenced
this pull request
Oct 7, 2019
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 9bd1b1a8eca97a2403bc7a2ed9a52427d8c27078 Component: engine
burnMyDread
pushed a commit
to burnMyDread/moby
that referenced
this pull request
Oct 21, 2019
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Signed-off-by: zach <Zachary.Joyner@linux.com>
thaJeztah
added a commit
to thaJeztah/cli
that referenced
this pull request
Oct 23, 2019
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah
added a commit
to thaJeztah/cli
that referenced
this pull request
Oct 23, 2019
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was referenced Dec 12, 2019
zappy-shu
pushed a commit
to zappy-shu/cli
that referenced
this pull request
Jan 21, 2020
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
ndeloof
added a commit
to compose-spec/compose-go
that referenced
this pull request
Jan 24, 2020
includes required changes to support darccio/mergo#120 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
docker-jenkins
pushed a commit
to docker/docker-ce
that referenced
this pull request
Jan 24, 2020
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 6cf7970cd397a77155aec077bd27755bc033b6f4 Component: cli
eiffel-fl
pushed a commit
to eiffel-fl/cli
that referenced
this pull request
Jul 28, 2020
full diff: darccio/mergo@v0.3.7...v0.3.8 includes: - darccio/mergo#112 Add strict override - fixes darccio/mergo#111 WithOverride should be able to check types - darccio/mergo#106 Fix merging of interface types with concrete values - darccio/mergo#120 should not overwrite pointers directly, instead check embedded values - fixes darccio/mergo#114 Embedded struct of pointer types will overwrite the whole destination struct - darccio/mergo#125 added WithOverrideEmptySlice config flag Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes issue #114
if overwrite is enabled, check if src.Kind() is a pointer before setting the dst field.
This will let us check the values inside pointer and overwrite the dst field, only if src field is not empty.
Added test cases to verify this fix.