summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2021-04-19 21:27:53 -0700
committerGitHub <[email protected]>2021-04-19 21:27:53 -0700
commita0937d1b588cbb39c0fb9c250ebf21dce42b7dab (patch)
treebb658d951719fb3d0b4ed90df9aded48d4bbaeb1 /usage.go
parent6a01a15f75472271568c732c1191e9d33a5fc54c (diff)
parent01a9fab8d768fbcb11e51d4df3c8fda6230462da (diff)
Merge pull request #150 from alexflint/push-coverage-up-more
Push test coverage up to 100%
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) {