refactor help func in CLI

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Victor Vieux
2016-11-17 10:54:10 -08:00
parent 91aed2e673
commit 55908f8a82
13 changed files with 22 additions and 51 deletions

View File

@ -1,8 +1,6 @@
package secret
import (
"fmt"
"github.com/spf13/cobra"
"github.com/docker/docker/cli"
@ -15,9 +13,7 @@ func NewSecretCommand(dockerCli *command.DockerCli) *cobra.Command {
Use: "secret",
Short: "Manage Docker secrets",
Args: cli.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintf(dockerCli.Err(), "\n"+cmd.UsageString())
},
RunE: dockerCli.ShowHelp,
}
cmd.AddCommand(
newSecretListCommand(dockerCli),