Skip to content

Commit b2a0d59

Browse files
committed
Merge pull request #25 from th0114nd/stderr_printing
Changed the usage printing to stderr if it is not from -h or --help
2 parents 854c423 + f7b99ad commit b2a0d59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docopt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func Parse(doc string, argv []string, help bool, version string,
5252
args, output, err := parse(doc, argv, help, version, optionsFirst)
5353
if _, ok := err.(*UserError); ok {
5454
// the user gave us bad input
55-
fmt.Println(output)
55+
fmt.Fprintln(os.Stderr, output)
5656
if exitOk {
5757
os.Exit(1)
5858
}

0 commit comments

Comments
 (0)