Add global flags to all commands and subcommands (#2605)

This commit is contained in:
Anis Elleuch
2016-09-01 23:12:49 +01:00
committed by Harshavardhana
parent ff99392102
commit 3e284162d7
9 changed files with 62 additions and 40 deletions

View File

@@ -33,10 +33,6 @@ import (
// command specific flags.
var (
updateFlags = []cli.Flag{
cli.BoolFlag{
Name: "help, h",
Usage: "Help for update.",
},
cli.BoolFlag{
Name: "experimental, E",
Usage: "Check experimental update.",
@@ -49,7 +45,7 @@ var updateCmd = cli.Command{
Name: "update",
Usage: "Check for a new software update.",
Action: mainUpdate,
Flags: updateFlags,
Flags: append(updateFlags, globalFlags...),
CustomHelpTemplate: `Name:
minio {{.Name}} - {{.Usage}}