diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-06-18 10:37:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 10:37:37 -0400 |
commit | 48db8d9868ecbb1523f5b4b69815d16a19afa36f (patch) | |
tree | f1dfde65a2500c3813f91d6fa9f0566a76c483b8 /vendor/github.com/imdario/mergo | |
parent | ce04a3e17f5d5ac1d0ac29302dc6e6d98edf28eb (diff) | |
parent | b6662eed3f27ac5466501b046db4f1608845af61 (diff) | |
download | podman-48db8d9868ecbb1523f5b4b69815d16a19afa36f.tar.gz podman-48db8d9868ecbb1523f5b4b69815d16a19afa36f.tar.bz2 podman-48db8d9868ecbb1523f5b4b69815d16a19afa36f.zip |
Merge pull request #10690 from rhatdan/VENDOR
Vendor in containers/common v0.40.0
Diffstat (limited to 'vendor/github.com/imdario/mergo')
-rw-r--r-- | vendor/github.com/imdario/mergo/.travis.yml | 3 | ||||
-rw-r--r-- | vendor/github.com/imdario/mergo/README.md | 2 | ||||
-rw-r--r-- | vendor/github.com/imdario/mergo/merge.go | 9 |
3 files changed, 11 insertions, 3 deletions
diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml index dad29725f..d324c43ba 100644 --- a/vendor/github.com/imdario/mergo/.travis.yml +++ b/vendor/github.com/imdario/mergo/.travis.yml @@ -1,4 +1,7 @@ language: go +arch: + - amd64 + - ppc64le install: - go get -t - go get golang.org/x/tools/cmd/cover diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md index 876abb500..aa8cbd7ce 100644 --- a/vendor/github.com/imdario/mergo/README.md +++ b/vendor/github.com/imdario/mergo/README.md @@ -97,7 +97,7 @@ If Mergo is useful to you, consider buying me a coffee, a beer, or making a mont - [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) - [jnuthong/item_search](https://github.com/jnuthong/item_search) - [bukalapak/snowboard](https://github.com/bukalapak/snowboard) -- [janoszen/containerssh](https://github.com/janoszen/containerssh) +- [containerssh/containerssh](https://github.com/containerssh/containerssh) ## Install diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go index afa84a1e2..8c2a8fcd9 100644 --- a/vendor/github.com/imdario/mergo/merge.go +++ b/vendor/github.com/imdario/mergo/merge.go @@ -95,13 +95,18 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, co } } } else { - if (isReflectNil(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc) { + if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src) || overwriteWithEmptySrc) { dst.Set(src) } } case reflect.Map: if dst.IsNil() && !src.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) + if dst.CanSet() { + dst.Set(reflect.MakeMap(dst.Type())) + } else { + dst = src + return + } } if src.Kind() != reflect.Map { |