From 7a9e414988cd16db520b083ddae728fd986d971e Mon Sep 17 00:00:00 2001 From: yuexiao-wang Date: Tue, 29 Nov 2016 23:44:12 +0800 Subject: [PATCH] Fix the inconsistency for docker secret Signed-off-by: yuexiao-wang --- command/secret/inspect.go | 2 +- command/secret/ls.go | 7 ++++--- command/secret/remove.go | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/command/secret/inspect.go b/command/secret/inspect.go index 1dda6f7838..0a8bd4a23f 100644 --- a/command/secret/inspect.go +++ b/command/secret/inspect.go @@ -25,7 +25,7 @@ func newSecretInspectCommand(dockerCli *command.DockerCli) *cobra.Command { }, } - cmd.Flags().StringVarP(&opts.format, "format", "f", "", "Format the output using the given go template") + cmd.Flags().StringVarP(&opts.format, "format", "f", "", "Format the output using the given Go template") return cmd } diff --git a/command/secret/ls.go b/command/secret/ls.go index d96b377867..faeab314b7 100644 --- a/command/secret/ls.go +++ b/command/secret/ls.go @@ -21,9 +21,10 @@ func newSecretListCommand(dockerCli *command.DockerCli) *cobra.Command { opts := listOptions{} cmd := &cobra.Command{ - Use: "ls [OPTIONS]", - Short: "List secrets", - Args: cli.NoArgs, + Use: "ls [OPTIONS]", + Aliases: []string{"list"}, + Short: "List secrets", + Args: cli.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { return runSecretList(dockerCli, opts) }, diff --git a/command/secret/remove.go b/command/secret/remove.go index 5026a437f8..41651a16b8 100644 --- a/command/secret/remove.go +++ b/command/secret/remove.go @@ -15,9 +15,10 @@ type removeOptions struct { func newSecretRemoveCommand(dockerCli *command.DockerCli) *cobra.Command { return &cobra.Command{ - Use: "rm SECRET [SECRET...]", - Short: "Remove one or more secrets", - Args: cli.RequiresMinArgs(1), + Use: "rm SECRET [SECRET...]", + Aliases: []string{"remove"}, + Short: "Remove one or more secrets", + Args: cli.RequiresMinArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts := removeOptions{ names: args,