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:
@@ -17,6 +17,8 @@
|
||||
package images
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
@@ -24,7 +26,6 @@ import (
|
||||
"github.com/containerd/containerd/images/archive"
|
||||
"github.com/containerd/containerd/platforms"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@@ -73,7 +74,7 @@ When '--all-platforms' is given all images in a manifest list must be available.
|
||||
for _, ps := range pss {
|
||||
p, err := platforms.Parse(ps)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "invalid platform %q", ps)
|
||||
return fmt.Errorf("invalid platform %q: %w", ps, err)
|
||||
}
|
||||
all = append(all, p)
|
||||
}
|
||||
|
Reference in New Issue
Block a user