From 4d3820c145448b83214c1d951b82791cbc93a023 Mon Sep 17 00:00:00 2001 From: Martin Falatic Date: Thu, 25 Jun 2015 01:30:54 -0700 Subject: [PATCH] If there are no commands, don't show Commands section. Also fixed Copyright section formatting. --- help.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/help.go b/help.go index c80636a..7148c19 100644 --- a/help.go +++ b/help.go @@ -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}} `