]> Cypherpunks repositories - gostls13.git/commit
flag: exit 0 when -h or -help invoked but undefined
authorShang Jian Ding <sding3@ncsu.edu>
Fri, 3 Apr 2020 00:13:08 +0000 (00:13 +0000)
committerIan Lance Taylor <iant@golang.org>
Fri, 3 Apr 2020 04:24:39 +0000 (04:24 +0000)
commitdcf0929de6a12103a8fd7097abd6e797188c366d
treeacbd8fa6dd75d2fdc5249219f39d5345ec7c4eea
parent041bcb32b59b37ff55ad527083b7bd4ffa4c1a3d
flag: exit 0 when -h or -help invoked but undefined

flag treats -h or -help as a special case to print a nice help
message, but exit with a status code of 2. This update makes
that status code 0.

Fixes #37533

Change-Id: I7e0bd29944ce46607fb7cfc6740734f7444a151a
GitHub-Last-Rev: 83f64d757bc3a9957c49caa5de74d05a96724771
GitHub-Pull-Request: golang/go#37530
Reviewed-on: https://go-review.googlesource.com/c/go/+/221427
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go1.15.html
src/flag/flag.go
src/flag/flag_test.go