summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2017-03-09 21:49:31 -0800
committerGitHub <[email protected]>2017-03-09 21:49:31 -0800
commit8111804d1774e2f9e2f7f734a15d2fb9ca684685 (patch)
tree730568a77df398d2e301759125f7287c44935918 /usage.go
parente6e0f59a1777b399abbd2ad840811ad5d6bab04e (diff)
parentb413f8dfb0b6a402b0c048d3a0c582a9f677f98b (diff)
Merge pull request #53 from k3a/master
Make usage output nicer
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/usage.go b/usage.go
index ad028e0..bf7fb83 100644
--- a/usage.go
+++ b/usage.go
@@ -33,7 +33,7 @@ func (p *Parser) WriteUsage(w io.Writer) {
fmt.Fprintln(w, p.version)
}
- fmt.Fprintf(w, "usage: %s", p.config.Program)
+ fmt.Fprintf(w, "Usage: %s", p.config.Program)
// write the option component of the usage message
for _, spec := range options {
@@ -80,9 +80,9 @@ func (p *Parser) WriteHelp(w io.Writer) {
// write the list of positionals
if len(positionals) > 0 {
- fmt.Fprint(w, "\npositional arguments:\n")
+ fmt.Fprint(w, "\nPositional arguments:\n")
for _, spec := range positionals {
- left := " " + spec.long
+ left := " " + strings.ToUpper(spec.long)
fmt.Fprint(w, left)
if spec.help != "" {
if len(left)+2 < colWidth {
@@ -97,7 +97,7 @@ func (p *Parser) WriteHelp(w io.Writer) {
}
// write the list of options
- fmt.Fprint(w, "\noptions:\n")
+ fmt.Fprint(w, "\nOptions:\n")
for _, spec := range options {
printOption(w, spec)
}