aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/imdario/mergo/mergo.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-09 06:35:56 -0400
committerGitHub <noreply@github.com>2020-09-09 06:35:56 -0400
commit6b1a1fcc5cb92a9fd5800b0d1af44f26093a8153 (patch)
treed826ee6b670f5099ac116c08766887db0288d329 /vendor/github.com/imdario/mergo/mergo.go
parent814784c5e6b9795d62a2c7624bc8884bd1011287 (diff)
parent7fea46752cbfb0ef7bfdd694afe95038c9875212 (diff)
downloadpodman-6b1a1fcc5cb92a9fd5800b0d1af44f26093a8153.tar.gz
podman-6b1a1fcc5cb92a9fd5800b0d1af44f26093a8153.tar.bz2
podman-6b1a1fcc5cb92a9fd5800b0d1af44f26093a8153.zip
Merge pull request #6811 from vrothberg/multi-image-archives
podman load/save: support multi-image docker archive
Diffstat (limited to 'vendor/github.com/imdario/mergo/mergo.go')
-rw-r--r--vendor/github.com/imdario/mergo/mergo.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go
index a82fea2fd..3cc926c7f 100644
--- a/vendor/github.com/imdario/mergo/mergo.go
+++ b/vendor/github.com/imdario/mergo/mergo.go
@@ -20,6 +20,7 @@ var (
ErrNotSupported = errors.New("only structs and maps are supported")
ErrExpectedMapAsDestination = errors.New("dst was expected to be a map")
ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct")
+ ErrNonPointerAgument = errors.New("dst must be a pointer")
)
// During deepMerge, must keep track of checks that are
@@ -75,23 +76,3 @@ func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) {
}
return
}
-
-// Traverses recursively both values, assigning src's fields values to dst.
-// The map argument tracks comparisons that have already been seen, which allows
-// short circuiting on recursive types.
-func deeper(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) {
- if dst.CanAddr() {
- addr := dst.UnsafeAddr()
- h := 17 * addr
- seen := visited[h]
- typ := dst.Type()
- for p := seen; p != nil; p = p.next {
- if p.ptr == addr && p.typ == typ {
- return nil
- }
- }
- // Remember, remember...
- visited[h] = &visit{addr, typ, seen}
- }
- return // TODO refactor
-}