summaryrefslogtreecommitdiff
path: root/vendor/github.com/imdario
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-06-16 05:57:09 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-06-17 14:59:42 -0400
commitb6662eed3f27ac5466501b046db4f1608845af61 (patch)
tree7a4f80a77f812505a6261bc11ed8151235f903f1 /vendor/github.com/imdario
parent725b5001a17f703d95a3c88e4f58225c5290576b (diff)
downloadpodman-b6662eed3f27ac5466501b046db4f1608845af61.tar.gz
podman-b6662eed3f27ac5466501b046db4f1608845af61.tar.bz2
podman-b6662eed3f27ac5466501b046db4f1608845af61.zip
Vendor in containers/common v0.40.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/imdario')
-rw-r--r--vendor/github.com/imdario/mergo/.travis.yml3
-rw-r--r--vendor/github.com/imdario/mergo/README.md2
-rw-r--r--vendor/github.com/imdario/mergo/merge.go9
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 {