remove aliases for containerd/errdefs, disallow docker/errdefs

We transitioned most functionality of docker/errdefs to containerd
errdefs module, and the docker/errdefs package should no longer be
used.

Because of that, there will no longer be ambiguity, so we can remove
the aliases for this package, and use it as "errdefs".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-28 14:55:43 +02:00
parent e2a4e429bc
commit 89d8c8a2a7
22 changed files with 58 additions and 57 deletions

View File

@ -5,7 +5,7 @@ import (
"fmt"
"strconv"
cerrdefs "github.com/containerd/errdefs"
"github.com/containerd/errdefs"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/completion"
@ -59,7 +59,7 @@ func runRemove(ctx context.Context, dockerCLI command.Cli, networks []string, op
}
}
if err := apiClient.NetworkRemove(ctx, name); err != nil {
if opts.force && cerrdefs.IsNotFound(err) {
if opts.force && errdefs.IsNotFound(err) {
continue
}
_, _ = fmt.Fprintln(dockerCLI.Err(), err)