summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorMario Hros <[email protected]>2017-03-08 20:44:01 +0100
committerMario Hros <[email protected]>2017-03-08 20:44:01 +0100
commit9173d259efa4541969667cda57d52663c48c66db (patch)
treec4e6af6b063149890851ee093d4f7822295c7030 /usage.go
parent8488cf10ceffaa0c78f84ce82b38374c3e546940 (diff)
nicer usage output
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)
}