From c4a46a7df2858904db25b7eaabaf5a75458bea3f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 12 Oct 2016 08:06:41 -0700 Subject: [PATCH] app: Add App.Description So you can describe what the application is for without requiring users to drill down into a particular command. --- app.go | 2 ++ help.go | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app.go b/app.go index b9adf46..e5c2839 100644 --- a/app.go +++ b/app.go @@ -42,6 +42,8 @@ type App struct { ArgsUsage string // Version of the program Version string + // Description of the program + Description string // List of commands to execute Commands []Command // List of flags to parse diff --git a/help.go b/help.go index ba34719..529e5ea 100644 --- a/help.go +++ b/help.go @@ -20,7 +20,10 @@ USAGE: {{if .Version}}{{if not .HideVersion}} VERSION: {{.Version}} - {{end}}{{end}}{{if len .Authors}} + {{end}}{{end}}{{if .Description}} +DESCRIPTION: + {{.Description}} +{{end}}{{if len .Authors}} AUTHOR(S): {{range .Authors}}{{.}}{{end}} {{end}}{{if .VisibleCommands}}