1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

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

@@ -14,10 +14,7 @@ func NewNodeCommand(dockerCli *command.DockerCli) *cobra.Command {
Use: "node",
Short: "Manage Swarm nodes",
Args: cli.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
cmd.SetOutput(dockerCli.Err())
cmd.HelpFunc()(cmd, args)
},
RunE: dockerCli.ShowHelp,
}
cmd.AddCommand(
newDemoteCommand(dockerCli),