summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/usage.go b/usage.go
index 13134d0..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)
}
@@ -103,7 +103,6 @@ func (p *Parser) WriteHelp(w io.Writer) {
func synopsis(spec *spec, form string) string {
if spec.dest.Kind() == reflect.Bool {
return form
- } else {
- return form + " " + strings.ToUpper(spec.long)
}
+ return form + " " + strings.ToUpper(spec.long)
}