Skip to content

Commit 2517256

Browse files
committed
cli/command/trust: remove errdefs uses
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 1168edb commit 2517256

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cli/command/trust/revoke.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"github.com/docker/cli/cli/command/image"
1010
"github.com/docker/cli/cli/trust"
1111
"github.com/docker/cli/internal/prompt"
12-
"github.com/docker/docker/errdefs"
1312
"github.com/pkg/errors"
1413
"github.com/spf13/cobra"
1514
"github.com/theupdateframework/notary/client"
@@ -50,7 +49,7 @@ func revokeTrust(ctx context.Context, dockerCLI command.Cli, remote string, opti
5049
return err
5150
}
5251
if !deleteRemote {
53-
return errdefs.Cancelled(errors.New("trust revoke has been cancelled"))
52+
return cancelledErr{errors.New("trust revoke has been cancelled")}
5453
}
5554
}
5655

@@ -70,6 +69,10 @@ func revokeTrust(ctx context.Context, dockerCLI command.Cli, remote string, opti
7069
return nil
7170
}
7271

72+
type cancelledErr struct{ error }
73+
74+
func (cancelledErr) Cancelled() {}
75+
7376
func revokeSignature(notaryRepo client.Repository, tag string) error {
7477
if tag != "" {
7578
// Revoke signature for the specified tag

0 commit comments

Comments
 (0)