diff options
| author | Mario Hros <[email protected]> | 2017-03-08 20:44:01 +0100 |
|---|---|---|
| committer | Mario Hros <[email protected]> | 2017-03-08 20:44:01 +0100 |
| commit | 9173d259efa4541969667cda57d52663c48c66db (patch) | |
| tree | c4e6af6b063149890851ee093d4f7822295c7030 /usage.go | |
| parent | 8488cf10ceffaa0c78f84ce82b38374c3e546940 (diff) | |
nicer usage output
Diffstat (limited to 'usage.go')
| -rw-r--r-- | usage.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) } |
