From 1d334f10ce73c2b9e65c50a2290a86be3c743ff2 Mon Sep 17 00:00:00 2001 From: "Alan D. Cabrera" Date: Fri, 8 Sep 2017 10:37:48 -0700 Subject: [PATCH] Add newline before command categories The simple formatting change adds a nice blank line before each command category. Documentation in README.md is also updated to be more accurate. --- README.md | 4 ++-- help.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 883cc10..34055fe 100644 --- a/README.md +++ b/README.md @@ -761,11 +761,11 @@ func main() { }, { Name: "add", - Category: "template", + Category: "Template actions", }, { Name: "remove", - Category: "template", + Category: "Template actions", }, } diff --git a/help.go b/help.go index 57ec98d..ed084fc 100644 --- a/help.go +++ b/help.go @@ -29,6 +29,7 @@ AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}: {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}} COMMANDS:{{range .VisibleCategories}}{{if .Name}} + {{.Name}}:{{end}}{{range .VisibleCommands}} {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}