diff options
| author | Alex Flint <[email protected]> | 2017-03-09 21:49:31 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-03-09 21:49:31 -0800 |
| commit | 8111804d1774e2f9e2f7f734a15d2fb9ca684685 (patch) | |
| tree | 730568a77df398d2e301759125f7287c44935918 /usage.go | |
| parent | e6e0f59a1777b399abbd2ad840811ad5d6bab04e (diff) | |
| parent | b413f8dfb0b6a402b0c048d3a0c582a9f677f98b (diff) | |
Merge pull request #53 from k3a/master
Make usage output nicer
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) } |
