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}} {{.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}}
` `