mirror of
https://github.com/golang/go
synced 2024-11-22 02:34:40 -07:00
Explain why
-flag true does not work although -flag=true does. Fixes #139. R=iant CC=golang-dev https://golang.org/cl/154118
This commit is contained in:
parent
662ee8704c
commit
f9919ba323
@ -31,8 +31,13 @@
|
||||
Command line flag syntax:
|
||||
-flag
|
||||
-flag=x
|
||||
-flag x
|
||||
-flag x // non-boolean flags only
|
||||
One or two minus signs may be used; they are equivalent.
|
||||
The last form is not permitted for boolean flags because the
|
||||
meaning of the command
|
||||
cmd -x *
|
||||
will change if there is a file called 0, false, etc. You must
|
||||
use the -flag=false form to turn off a boolean flag.
|
||||
|
||||
Flag parsing stops just before the first non-flag argument
|
||||
("-" is a non-flag argument) or after the terminator "--".
|
||||
|
Loading…
Reference in New Issue
Block a user