summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/usage.go b/usage.go
index 4852866..a1ed5a2 100644
--- a/usage.go
+++ b/usage.go
@@ -9,9 +9,9 @@ import (
"strings"
)
-// Fail prints usage information to stdout and exits with non-zero status
+// Fail prints usage information to stderr and exits with non-zero status
func (p *Parser) Fail(msg string) {
- p.WriteUsage(os.Stdout)
+ p.WriteUsage(os.Stderr)
fmt.Println("error:", msg)
os.Exit(-1)
}