libpod: switch to golang native error wrapping

We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

[NO NEW TESTS NEEDED]

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
Sascha Grunert
2022-07-05 11:42:22 +02:00
parent 340eeed0cb
commit 251d91699d
96 changed files with 1564 additions and 1542 deletions

View File

@ -1,10 +1,11 @@
package libpod
import (
"fmt"
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/libpod/layers"
"github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
)
var initInodes = map[string]bool{
@ -76,5 +77,5 @@ func (r *Runtime) getLayerID(id string, diffType define.DiffType) (string, error
}
lastErr = err
}
return "", errors.Wrapf(lastErr, "%s not found", id)
return "", fmt.Errorf("%s not found: %w", id, lastErr)
}