From 98d0b0cc142a53fb30c561d340b7ea245a33ce08 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 5 Mar 2025 18:21:49 +0100 Subject: [PATCH] cli/command/image: remove deprecated TrustedPush This function was only used by "docker trust sign", and has no known external consumers. It was deprecated in c6f456bc90574f4180f3b990e8a4e216485e35b7; this commit removes it. Signed-off-by: Sebastiaan van Stijn --- cli/command/image/trust.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/cli/command/image/trust.go b/cli/command/image/trust.go index b4a6d84a00..21f9cf8c1d 100644 --- a/cli/command/image/trust.go +++ b/cli/command/image/trust.go @@ -41,20 +41,6 @@ func newNotaryClient(cli command.Streams, imgRefAndAuth trust.ImageRefAndAuth) ( return trust.GetNotaryRepository(cli.In(), cli.Out(), command.UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), "pull") } -// TrustedPush handles content trust pushing of an image. -// -// Deprecated: this function was only used internally and will be removed in the next release. -func TrustedPush(ctx context.Context, cli command.Cli, repoInfo *registry.RepositoryInfo, ref reference.Named, authConfig registrytypes.AuthConfig, options image.PushOptions) error { - responseBody, err := cli.Client().ImagePush(ctx, reference.FamiliarString(ref), options) - if err != nil { - return err - } - - defer responseBody.Close() - - return trust.PushTrustedReference(ctx, cli, repoInfo, ref, authConfig, responseBody, command.UserAgent()) -} - // PushTrustedReference pushes a canonical reference to the trust server. // // Deprecated: use [trust.PushTrustedReference] instead. this function was only used internally and will be removed in the next release.