mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 12:10:24 +03:00
cli: Make sure to add --help flag for subcommands. (#3773)
--help is now back and prints properly with command help template.
This commit is contained in:
+9
-4
@@ -29,10 +29,15 @@ var versionCmd = cli.Command{
|
||||
{{.HelpName}} - {{.Usage}}
|
||||
|
||||
USAGE:
|
||||
{{.HelpName}}
|
||||
|
||||
VERSION:
|
||||
` + Version + `{{"\n"}}`,
|
||||
{{.HelpName}}{{if .VisibleFlags}} [FLAGS]{{end}}
|
||||
{{if .VisibleFlags}}
|
||||
FLAGS:
|
||||
{{range .VisibleFlags}}{{.}}
|
||||
{{end}}{{end}}
|
||||
EXAMPLES:
|
||||
1. Prints server version:
|
||||
$ {{.HelpName}}
|
||||
`,
|
||||
}
|
||||
|
||||
func mainVersion(ctx *cli.Context) {
|
||||
|
||||
Reference in New Issue
Block a user