mirror of https://github.com/containers/podman.git
Remove more Errorf in favor of Wrapf
Signed-off-by: Matthew Heon <mheon@redhat.com> Closes: #668 Approved by: rhatdan
This commit is contained in:
parent
379404d306
commit
aa247f950c
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue