summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2015-11-04 09:47:58 -0800
committerAlex Flint <[email protected]>2015-11-04 09:47:58 -0800
commit9111061915102e12f0e3481c3bf88aa23a3d7324 (patch)
tree9ace7877b43e833479ee523ee76043eb59d8b58b /usage.go
parent3bcc30f8fefe10a730e0df3a30ce1eb3c54b0861 (diff)
add tests for usage info
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/usage.go b/usage.go
index dc3ef3c..4852866 100644
--- a/usage.go
+++ b/usage.go
@@ -84,7 +84,7 @@ func (p *Parser) WriteHelp(w io.Writer) {
if spec.short != "" {
left += ", " + synopsis(spec, "-"+spec.short)
}
- fmt.Print(left)
+ fmt.Fprint(w, left)
if spec.help != "" {
if len(left)+2 < colWidth {
fmt.Fprint(w, strings.Repeat(" ", colWidth-len(left)))