Skip to content
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

Don't append slice if not asked to #82

Merged
merged 1 commit into from
Jun 8, 2018

Conversation

vdemeester
Copy link
Collaborator

@vdemeester vdemeester commented Jun 8, 2018

Fix the case when we don't ask for slice to be appended but are
because of src and dst values.

cc @imdario seems like this is the cause of the build failure here

09:18:39 --- FAIL: TestLoadDaemonConfigWithNetwork (0.00s)
09:18:39 	daemon_unix_test.go:46: assertion failed: 127.0.0.1 (string) != ?00000000000000000000ffff7f00000100000000000000000000ffff00000000 (string)

I'm not a huge fan of that change as it's probably going to break current usage : a slice in a map is always appending, with this change it will only be appended if it is asked to

~/s/g/i/mergo{slice-merge-fix} λ go test ./...
ok      github.com/imdario/mergo        0.002s

Signed-off-by: Vincent Demeester vincent@sbr.pm

Fix the case when we don't ask for slice to be appended but are
because of `src` and `dst` values.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@darccio darccio merged commit 9316a62 into darccio:master Jun 8, 2018
@darccio
Copy link
Owner

darccio commented Jun 8, 2018

Done!

@vdemeester vdemeester deleted the slice-merge-fix branch June 8, 2018 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants