replace uses of client.IsErrNotFound for errdefs.IsNotFound
None of the client will return the old error-types, so there's no need to keep the compatibility code. We can consider deprecating this function in favor of the errdefs equivalent this. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
||||
"github.com/docker/cli/cli"
|
||||
"github.com/docker/cli/cli/command"
|
||||
"github.com/docker/docker/api/types"
|
||||
apiclient "github.com/docker/docker/client"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@ -63,7 +63,7 @@ func runRemove(dockerCli command.Cli, opts removeOptions, images []string) error
|
||||
for _, img := range images {
|
||||
dels, err := client.ImageRemove(ctx, img, options)
|
||||
if err != nil {
|
||||
if !apiclient.IsErrNotFound(err) {
|
||||
if !errdefs.IsNotFound(err) {
|
||||
fatalErr = true
|
||||
}
|
||||
errs = append(errs, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user