mirror of
https://github.com/containers/podman.git
synced 2025-10-18 11:42:55 +08:00
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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user