From e8adec5f41388916b0f2206dc898a5587d51467c Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 30 Jun 2022 10:05:44 +0200 Subject: cmd/podman: 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. Signed-off-by: Sascha Grunert --- cmd/podman/volumes/create.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd/podman/volumes/create.go') diff --git a/cmd/podman/volumes/create.go b/cmd/podman/volumes/create.go index b47ae16ce..0d19fab47 100644 --- a/cmd/podman/volumes/create.go +++ b/cmd/podman/volumes/create.go @@ -8,7 +8,6 @@ import ( "github.com/containers/podman/v4/cmd/podman/parse" "github.com/containers/podman/v4/cmd/podman/registry" "github.com/containers/podman/v4/pkg/domain/entities" - "github.com/pkg/errors" "github.com/spf13/cobra" ) @@ -65,11 +64,11 @@ func create(cmd *cobra.Command, args []string) error { } createOpts.Label, err = parse.GetAllLabels([]string{}, opts.Label) if err != nil { - return errors.Wrapf(err, "unable to process labels") + return fmt.Errorf("unable to process labels: %w", err) } createOpts.Options, err = parse.GetAllLabels([]string{}, opts.Opts) if err != nil { - return errors.Wrapf(err, "unable to process options") + return fmt.Errorf("unable to process options: %w", err) } response, err := registry.ContainerEngine().VolumeCreate(context.Background(), createOpts) if err != nil { -- cgit v1.2.3-54-g00ecf