If there are no commands, don't show Commands section. Also fixed Copyright section formatting.
This commit is contained in:
parent
dbde3303cf
commit
4d3820c145
6
help.go
6
help.go
@ -21,14 +21,16 @@ VERSION:
|
|||||||
{{.Version}}{{end}}{{if len .Authors}}
|
{{.Version}}{{end}}{{if len .Authors}}
|
||||||
|
|
||||||
AUTHOR(S):
|
AUTHOR(S):
|
||||||
{{range .Authors}}{{ . }}{{end}}{{end}}
|
{{range .Authors}}{{ . }}{{end}}{{end}}{{if .Commands}}
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
|
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
|
||||||
{{end}}{{if .Flags}}
|
{{end}}{{end}}{{if .Flags}}
|
||||||
|
|
||||||
GLOBAL OPTIONS:
|
GLOBAL OPTIONS:
|
||||||
{{range .Flags}}{{.}}
|
{{range .Flags}}{{.}}
|
||||||
{{end}}{{end}}{{if .Copyright }}
|
{{end}}{{end}}{{if .Copyright }}
|
||||||
|
|
||||||
COPYRIGHT:
|
COPYRIGHT:
|
||||||
{{.Copyright}}{{end}}
|
{{.Copyright}}{{end}}
|
||||||
`
|
`
|
||||||
|
Loading…
Reference in New Issue
Block a user