Skip to content

Commit 8c22927

Browse files
committed
cli/command: remove AddTrustSigningFlags
it was only used internally in a single location, so inline the code where it's used. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c1cc6b6 commit 8c22927

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

cli/command/image/push.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewPushCommand(dockerCli command.Cli) *cobra.Command {
5757
flags := cmd.Flags()
5858
flags.BoolVarP(&opts.all, "all-tags", "a", false, "Push all tags of an image to the repository")
5959
flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Suppress verbose output")
60-
command.AddTrustSigningFlags(flags, &opts.untrusted, dockerCli.ContentTrustEnabled())
60+
flags.BoolVar(&opts.untrusted, "disable-content-trust", !dockerCli.ContentTrustEnabled(), "Skip image signing")
6161

6262
// Don't default to DOCKER_DEFAULT_PLATFORM env variable, always default to
6363
// pushing the image as-is. This also avoids forcing the platform selection

cli/command/trust.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ import (
88
func AddTrustVerificationFlags(fs *pflag.FlagSet, v *bool, trusted bool) {
99
fs.BoolVar(v, "disable-content-trust", !trusted, "Skip image verification")
1010
}
11-
12-
// AddTrustSigningFlags adds "signing" flags to the provided flagset
13-
func AddTrustSigningFlags(fs *pflag.FlagSet, v *bool, trusted bool) {
14-
fs.BoolVar(v, "disable-content-trust", !trusted, "Skip image signing")
15-
}

0 commit comments

Comments
 (0)