summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2015-11-11 09:34:05 -0800
committerAlex Flint <[email protected]>2015-11-11 09:34:05 -0800
commitc4704194de65e09b88ebae2f2c81ee4e0a3be5d8 (patch)
tree43830596b97d031888cda7c51d42a9dec129c3c5
parent0f9dfa27d10f148f054a2ced60902637650c270a (diff)
parentdf17f4df4588e6ff41b0ff3045382775d6a8f748 (diff)
Merge pull request #14 from walle/usage_on_stderr_bug
Fix bug with error not being written to stderr
-rw-r--r--usage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/usage.go b/usage.go
index 82962c8..824f0eb 100644
--- a/usage.go
+++ b/usage.go
@@ -12,7 +12,7 @@ import (
// Fail prints usage information to stderr and exits with non-zero status
func (p *Parser) Fail(msg string) {
p.WriteUsage(os.Stderr)
- fmt.Println("error:", msg)
+ fmt.Fprintln(os.Stderr, "error:", msg)
os.Exit(-1)
}