diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-07-31 09:27:21 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-09-08 08:47:19 +0200 |
commit | 7fea46752cbfb0ef7bfdd694afe95038c9875212 (patch) | |
tree | cabd8c0ea232c36cfff7511cb1b1f3bfa30c0bbf /vendor/github.com/imdario/mergo/mergo.go | |
parent | be7778df6c70227dab760ea92637ed97dad29641 (diff) | |
download | podman-7fea46752cbfb0ef7bfdd694afe95038c9875212.tar.gz podman-7fea46752cbfb0ef7bfdd694afe95038c9875212.tar.bz2 podman-7fea46752cbfb0ef7bfdd694afe95038c9875212.zip |
support multi-image (docker) archives
Support loading and saving tarballs with more than one image.
Add a new `/libpod/images/export` endpoint to the rest API to
allow for exporting/saving multiple images into an archive.
Note that a non-release version of containers/image is vendored.
A release version must be vendored before cutting a new Podman
release. We force the containers/image version via a replace in
the go.mod file; this way go won't try to match the versions.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/imdario/mergo/mergo.go')
-rw-r--r-- | vendor/github.com/imdario/mergo/mergo.go | 21 |
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 -} |