main/cli: Don't print hidden flags/commands in help template. (#3748)

Always use .VisibleFlags and .VisibleCommands to not print
Hidden flags as expected from help template.
master
Harshavardhana 8 years ago committed by GitHub
parent 602dac8773
commit 13c3b9cbcb
  1. 8
      cmd/main.go
  2. 2
      cmd/server-main.go
  3. 2
      cmd/update-main.go
  4. 2
      cmd/version-main.go

@ -53,13 +53,13 @@ DESCRIPTION:
{{.Description}}
USAGE:
minio {{if .Flags}}[flags] {{end}}command{{if .Flags}}{{end}} [arguments...]
minio {{if .VisibleFlags}}[flags] {{end}}command{{if .VisibleFlags}}{{end}} [arguments...]
COMMANDS:
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .Flags}}
{{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .VisibleFlags}}
FLAGS:
{{range .Flags}}{{.}}
{{range .VisibleFlags}}{{.}}
{{end}}{{end}}
VERSION:
` + Version +

@ -52,7 +52,7 @@ USAGE:
minio {{.Name}} [FLAGS] PATH [PATH...]
FLAGS:
{{range .Flags}}{{.}}
{{range .VisibleFlags}}{{.}}
{{end}}
ENVIRONMENT VARIABLES:
ACCESS:

@ -53,7 +53,7 @@ USAGE:
minio {{.Name}} [FLAGS]
FLAGS:
{{range .Flags}}{{.}}
{{range .VisibleFlags}}{{.}}
{{end}}
EXIT STATUS:
0 - You are already running the most recent version.

@ -38,7 +38,7 @@ USAGE:
minio {{.Name}}
FLAGS:
{{range .Flags}}{{.}}
{{range .VisibleFlags}}{{.}}
{{end}}
VERSION:
` + Version + `{{"\n"}}`,

Loading…
Cancel
Save