diff options
| author | Alex Flint <[email protected]> | 2015-11-09 10:04:37 -0800 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2015-11-09 10:04:37 -0800 |
| commit | a49bba8533235e33cb82893851edcbc2805a4b77 (patch) | |
| tree | d214a56d88f88d06d7dda7a7ede777054d7d424f /usage.go | |
| parent | a6c77a413a4c616d5e6f4bcd5d7480e1dcb86465 (diff) | |
| parent | 935b2a1bd5710aede269d46752e59fba916abaea (diff) | |
Merge pull request #10 from walle/fail_to_stderr
Write usage message to stderr on error
Diffstat (limited to 'usage.go')
| -rw-r--r-- | usage.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) } |
