mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
cli: Add new features from CLI.
use `.HelpName` for template to pass down proper command names. Also treat flags to be optional in all of them.
This commit is contained in:
@@ -37,24 +37,20 @@ var updateCmd = cli.Command{
|
||||
Usage: "Check for a new software update.",
|
||||
Action: mainUpdate,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "help, h",
|
||||
Usage: "Show this help.",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "quiet",
|
||||
Usage: "Disable any update messages.",
|
||||
},
|
||||
},
|
||||
CustomHelpTemplate: `Name:
|
||||
minio {{.Name}} - {{.Usage}}
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
minio {{.Name}} [FLAGS]
|
||||
|
||||
{{.HelpName}} {{if .VisibleFlags}}[FLAGS]{{end}}
|
||||
{{if .VisibleFlags}}
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
{{end}}{{end}}
|
||||
EXIT STATUS:
|
||||
0 - You are already running the most recent version.
|
||||
1 - New update is available.
|
||||
|
||||
Reference in New Issue
Block a user