app: Add App.Description
So you can describe what the application is for without requiring users to drill down into a particular command.
This commit is contained in:
parent
55f715e28c
commit
c4a46a7df2
2
app.go
2
app.go
@ -42,6 +42,8 @@ type App struct {
|
|||||||
ArgsUsage string
|
ArgsUsage string
|
||||||
// Version of the program
|
// Version of the program
|
||||||
Version string
|
Version string
|
||||||
|
// Description of the program
|
||||||
|
Description string
|
||||||
// List of commands to execute
|
// List of commands to execute
|
||||||
Commands []Command
|
Commands []Command
|
||||||
// List of flags to parse
|
// List of flags to parse
|
||||||
|
5
help.go
5
help.go
@ -20,7 +20,10 @@ USAGE:
|
|||||||
{{if .Version}}{{if not .HideVersion}}
|
{{if .Version}}{{if not .HideVersion}}
|
||||||
VERSION:
|
VERSION:
|
||||||
{{.Version}}
|
{{.Version}}
|
||||||
{{end}}{{end}}{{if len .Authors}}
|
{{end}}{{end}}{{if .Description}}
|
||||||
|
DESCRIPTION:
|
||||||
|
{{.Description}}
|
||||||
|
{{end}}{{if len .Authors}}
|
||||||
AUTHOR(S):
|
AUTHOR(S):
|
||||||
{{range .Authors}}{{.}}{{end}}
|
{{range .Authors}}{{.}}{{end}}
|
||||||
{{end}}{{if .VisibleCommands}}
|
{{end}}{{if .VisibleCommands}}
|
||||||
|
Loading…
Reference in New Issue
Block a user