-
Notifications
You must be signed in to change notification settings - Fork 1.8k
app: Add App.Description #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
So you can describe what the application is for without requiring users to drill down into a particular command.
|
Hi @wking, This was the intention of the Thank you! |
|
On Tue, Oct 18, 2016 at 08:28:11PM -0700, Jesse Szwedko wrote:
CommandHelpTemplate (vs. AppHelpTemplate) has separate USAGE and Conventional section names include NAME, SYNOPSIS, CONFIGURATION, Help generated by this package uses “USAGE” instead of “SYNOPSIS”, but One benefit of the distinction is that you will be able to put plain |
|
@wking aha, I see! I missed that |
This code initially landed with lots of space:
'{name} <{email}> '
or:
'{name} '
in 3d71833 (app, help: add support for multiple authors, 2015-01-31).
The doubled space between the name and email was removed in c6592bb
(app, help: add backwards compatibility for Authors, 2015-02-21), but
a trailing space remained in both the email and email-less cases.
This commit removes that trailing space.
Most of the changes here remove trailing whitespace, but I also add
code to select "AUTHOR" or "AUTHORS" as appropriate instead of the
previous "AUTHOR(S)". The template for listing with an entry per line
is:
{{range $index, $entry := pipeline}}{{if $index}}
{{end}}{{$entry}}{{end}}
That range syntax is discussed in [1].
Also add a unit test, which tests both these whitespace changes and
also the earlier App.Description addition.
[1]: https://golang.org/pkg/text/template/#hdr-Variables
|
This looks great, thank you for adding the tests @wking |
This just landed via [1] (hence the bump to an untagged commit). Generated with: $ godep update github.com/urfave/cli $ git add -A Godeps [1]: urfave/cli#543 Signed-off-by: W. Trevor King <[email protected]>
This just landed via [1] (hence the bump to an untagged commit). Generated with: $ godep update github.com/urfave/cli $ git add -A Godeps [1]: urfave/cli#543 Signed-off-by: W. Trevor King <[email protected]>
This landed via [1] which was released with v1.19.0. Bump to the most recent release to get the .1 bugfixes too [2]. Generated with: $ godep update github.com/urfave/cli $ git add -A Godeps [1]: urfave/cli#543 [2]: https://github.com/urfave/cli/blob/v1.19.1/CHANGELOG.md#1191---2016-11-21 Signed-off-by: W. Trevor King <[email protected]>
This landed via [1] which was released with v1.19.0. Bump to the most recent release to get the .1 bugfixes too [2]. Generated with: $ godep update github.com/urfave/cli godep: WARNING: Godep workspaces (./Godeps/_workspace) are deprecated and support for them will be removed when go1.8 is released. godep: WARNING: Go version (go1.7) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists $ git add -A Godeps [1]: urfave/cli#543 [2]: https://github.com/urfave/cli/blob/v1.19.1/CHANGELOG.md#1191---2016-11-21 Signed-off-by: W. Trevor King <[email protected]>
So you can describe what the application is for without requiring users to drill down into a particular command.
If this idea sounds usefull, I can add a test-case to this PR.