mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 20:50:22 +03: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:
+2
-11
@@ -25,21 +25,12 @@ var versionCmd = cli.Command{
|
||||
Name: "version",
|
||||
Usage: "Print version.",
|
||||
Action: mainVersion,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "help, h",
|
||||
Usage: "Show this help.",
|
||||
},
|
||||
},
|
||||
CustomHelpTemplate: `NAME:
|
||||
minio {{.Name}} - {{.Usage}}
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
minio {{.Name}}
|
||||
{{.HelpName}}
|
||||
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}
|
||||
VERSION:
|
||||
` + Version + `{{"\n"}}`,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user