summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/usage.go b/usage.go
index 231476b..c121c45 100644
--- a/usage.go
+++ b/usage.go
@@ -11,7 +11,11 @@ import (
const colWidth = 25
// to allow monkey patching in tests
-var stderr = os.Stderr
+var (
+ stdout io.Writer = os.Stdout
+ stderr io.Writer = os.Stderr
+ osExit = os.Exit
+)
// Fail prints usage information to stderr and exits with non-zero status
func (p *Parser) Fail(msg string) {