Fix the inconsistency for docker secret

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
This commit is contained in:
yuexiao-wang 2016-11-29 23:44:12 +08:00
parent a913891b7d
commit 7a9e414988
3 changed files with 9 additions and 7 deletions

View File

@ -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 return cmd
} }

View File

@ -21,9 +21,10 @@ func newSecretListCommand(dockerCli *command.DockerCli) *cobra.Command {
opts := listOptions{} opts := listOptions{}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "ls [OPTIONS]", Use: "ls [OPTIONS]",
Short: "List secrets", Aliases: []string{"list"},
Args: cli.NoArgs, Short: "List secrets",
Args: cli.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
return runSecretList(dockerCli, opts) return runSecretList(dockerCli, opts)
}, },

View File

@ -15,9 +15,10 @@ type removeOptions struct {
func newSecretRemoveCommand(dockerCli *command.DockerCli) *cobra.Command { func newSecretRemoveCommand(dockerCli *command.DockerCli) *cobra.Command {
return &cobra.Command{ return &cobra.Command{
Use: "rm SECRET [SECRET...]", Use: "rm SECRET [SECRET...]",
Short: "Remove one or more secrets", Aliases: []string{"remove"},
Args: cli.RequiresMinArgs(1), Short: "Remove one or more secrets",
Args: cli.RequiresMinArgs(1),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
opts := removeOptions{ opts := removeOptions{
names: args, names: args,