If there are no commands, don't show Commands section. Also fixed Copyright section formatting.

This commit is contained in:
Martin Falatic 2015-06-25 01:30:54 -07:00
parent dbde3303cf
commit 4d3820c145

View File

@ -21,14 +21,16 @@ VERSION:
{{.Version}}{{end}}{{if len .Authors}}
AUTHOR(S):
{{range .Authors}}{{ . }}{{end}}{{end}}
{{range .Authors}}{{ . }}{{end}}{{end}}{{if .Commands}}
COMMANDS:
{{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .Flags}}
{{end}}{{end}}{{if .Flags}}
GLOBAL OPTIONS:
{{range .Flags}}{{.}}
{{end}}{{end}}{{if .Copyright }}
COPYRIGHT:
{{.Copyright}}{{end}}
`