feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io> Co-authored-by: zounengren <zouyee1989@gmail.com>
This commit is contained in:
@@ -27,7 +27,6 @@ import (
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/containerd/platforms"
|
||||
"github.com/opencontainers/image-spec/identity"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@@ -93,7 +92,7 @@ When you are done, use the unmount command.
|
||||
ps := context.String("platform")
|
||||
p, err := platforms.Parse(ps)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "unable to parse platform %s", ps)
|
||||
return fmt.Errorf("unable to parse platform %s: %w", ps, err)
|
||||
}
|
||||
|
||||
img, err := client.ImageService().Get(ctx, ref)
|
||||
@@ -103,7 +102,7 @@ When you are done, use the unmount command.
|
||||
|
||||
i := containerd.NewImageWithPlatform(client, img, platforms.Only(p))
|
||||
if err := i.Unpack(ctx, snapshotter); err != nil {
|
||||
return errors.Wrap(err, "error unpacking image")
|
||||
return fmt.Errorf("error unpacking image: %w", err)
|
||||
}
|
||||
|
||||
diffIDs, err := i.RootFS(ctx)
|
||||
|
||||
Reference in New Issue
Block a user