From 251d91699de4e9aaab53ab6fea262d4b6bdaae8e Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 5 Jul 2022 11:42:22 +0200 Subject: 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 --- libpod/oci_missing.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libpod/oci_missing.go') diff --git a/libpod/oci_missing.go b/libpod/oci_missing.go index fd8160830..6a756757f 100644 --- a/libpod/oci_missing.go +++ b/libpod/oci_missing.go @@ -7,7 +7,6 @@ import ( "sync" "github.com/containers/podman/v4/libpod/define" - "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -209,7 +208,7 @@ func (r *MissingRuntime) ExecAttachSocketPath(ctr *Container, sessionID string) // the container, but Conmon should still place an exit file for it. func (r *MissingRuntime) ExitFilePath(ctr *Container) (string, error) { if ctr == nil { - return "", errors.Wrapf(define.ErrInvalidArg, "must provide a valid container to get exit file path") + return "", fmt.Errorf("must provide a valid container to get exit file path: %w", define.ErrInvalidArg) } return filepath.Join(r.exitsDir, ctr.ID()), nil } @@ -227,5 +226,5 @@ func (r *MissingRuntime) RuntimeInfo() (*define.ConmonInfo, *define.OCIRuntimeIn // Return an error indicating the runtime is missing func (r *MissingRuntime) printError() error { - return errors.Wrapf(define.ErrOCIRuntimeNotFound, "runtime %s is missing", r.name) + return fmt.Errorf("runtime %s is missing: %w", r.name, define.ErrOCIRuntimeNotFound) } -- cgit v1.2.3-54-g00ecf