summaryrefslogtreecommitdiff
path: root/src/pkg/flag/flag.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/flag/flag.go')
-rw-r--r--src/pkg/flag/flag.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pkg/flag/flag.go b/src/pkg/flag/flag.go
index e7c863ee9..cd2a165be 100644
--- a/src/pkg/flag/flag.go
+++ b/src/pkg/flag/flag.go
@@ -50,7 +50,8 @@
("-" is a non-flag argument) or after the terminator "--".
Integer flags accept 1234, 0664, 0x1234 and may be negative.
- Boolean flags may be 1, 0, t, f, true, false, TRUE, FALSE, True, False.
+ Boolean flags may be:
+ 1, 0, t, f, T, F, true, false, TRUE, FALSE, True, False
Duration flags accept any input valid for time.ParseDuration.
The default set of command-line flags is controlled by
@@ -269,7 +270,6 @@ type FlagSet struct {
actual map[string]*Flag
formal map[string]*Flag
args []string // arguments after flags
- exitOnError bool // does the program exit if there's an error?
errorHandling ErrorHandling
output io.Writer // nil means stderr; use out() accessor
}
@@ -755,7 +755,7 @@ func (f *FlagSet) parseOne() (bool, error) {
if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
if has_value {
if err := fv.Set(value); err != nil {
- return false, f.failf("invalid boolean value %q for -%s: %v", value, name, err)
+ return false, f.failf("invalid boolean value %q for -%s: %v", value, name, err)
}
} else {
fv.Set("true")