diff options
author | Matthew Heon <mheon@redhat.com> | 2018-04-24 17:32:07 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-04-25 18:34:55 +0000 |
commit | aa247f950c73e164486ac5f9f0c0d0d1b418de6a (patch) | |
tree | 5b0bac02d89251aaecdc5d76d502ca2f9a97938a | |
parent | 379404d30655c546d606f490514094fa7ca81cca (diff) | |
download | podman-aa247f950c73e164486ac5f9f0c0d0d1b418de6a.tar.gz podman-aa247f950c73e164486ac5f9f0c0d0d1b418de6a.tar.bz2 podman-aa247f950c73e164486ac5f9f0c0d0d1b418de6a.zip |
Remove more Errorf in favor of Wrapf
Signed-off-by: Matthew Heon <mheon@redhat.com>
Closes: #668
Approved by: rhatdan
-rw-r--r-- | libpod/image/pull.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go index 74a773987..cdecd4e0e 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -61,7 +61,7 @@ func (ir *Runtime) getPullStruct(srcRef types.ImageReference, destName string) ( } destRef, err := is.Transport.ParseStoreReference(ir.store, reference) if err != nil { - return nil, errors.Errorf("error parsing dest reference name: %v", err) + return nil, errors.Wrapf(err, "error parsing dest reference name") } return &pullStruct{ image: destName, @@ -85,7 +85,7 @@ func (ir *Runtime) getPullListFromRef(ctx context.Context, srcRef types.ImageRef manifest, err := tarSource.LoadTarManifest() if err != nil { - return nil, errors.Errorf("error retrieving manifest.json: %v", err) + return nil, errors.Wrapf(err, "error retrieving manifest.json") } // to pull the first image stored in the tar file if len(manifest) == 0 { @@ -224,7 +224,7 @@ func (i *Image) createNamesToPull() ([]*pullStruct, error) { if decomposedImage.hasRegistry { srcRef, err := alltransports.ParseImageName(decomposedImage.assembleWithTransport()) if err != nil { - return nil, errors.Errorf("unable to parse '%s'", i.InputName) + return nil, errors.Wrapf(err, "unable to parse '%s'", i.InputName) } ps := pullStruct{ image: i.InputName, @@ -246,7 +246,7 @@ func (i *Image) createNamesToPull() ([]*pullStruct, error) { decomposedImage.registry = registry srcRef, err := alltransports.ParseImageName(decomposedImage.assembleWithTransport()) if err != nil { - return nil, errors.Errorf("unable to parse '%s'", i.InputName) + return nil, errors.Wrapf(err, "unable to parse '%s'", i.InputName) } ps := pullStruct{ image: decomposedImage.assemble(), @@ -259,7 +259,7 @@ func (i *Image) createNamesToPull() ([]*pullStruct, error) { for _, pStruct := range pullNames { destRef, err := is.Transport.ParseStoreReference(i.imageruntime.store, pStruct.image) if err != nil { - return nil, errors.Errorf("error parsing dest reference name: %v", err) + return nil, errors.Wrapf(err, "error parsing dest reference name") } pStruct.dstRef = destRef } |