aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-12-06 14:23:52 -0500
committerRob Pike <r@golang.org>2010-12-06 14:23:52 -0500
commite26f9b3420f0d54ed38c07039c898b099ae8db80 (patch)
treee3fbd2a583eb5c8adfbf140535479046a0a9fbd9
parent730e39cd134ba13d1df4a5c0645d6a083fb540bc (diff)
downloadgo-e26f9b3420f0d54ed38c07039c898b099ae8db80.tar.gz
go-e26f9b3420f0d54ed38c07039c898b099ae8db80.zip
flag: fix format error in boolean error report. just use %q; the values are strings.
R=rsc CC=golang-dev https://golang.org/cl/3418043
-rw-r--r--src/pkg/flag/flag.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/flag/flag.go b/src/pkg/flag/flag.go
index 59c33403d3..e87f223964 100644
--- a/src/pkg/flag/flag.go
+++ b/src/pkg/flag/flag.go
@@ -459,7 +459,7 @@ func (f *allFlags) parseOne(index int) (ok bool, next int) {
if f, ok := flag.Value.(*boolValue); ok { // special case: doesn't need an arg
if has_value {
if !f.Set(value) {
- fmt.Fprintf(os.Stderr, "invalid boolean value %t for flag: -%s\n", value, name)
+ fmt.Fprintf(os.Stderr, "invalid boolean value %q for flag: -%s\n", value, name)
fail()
}
} else {
@@ -479,7 +479,7 @@ func (f *allFlags) parseOne(index int) (ok bool, next int) {
}
ok = flag.Value.Set(value)
if !ok {
- fmt.Fprintf(os.Stderr, "invalid value %s for flag: -%s\n", value, name)
+ fmt.Fprintf(os.Stderr, "invalid value %q for flag: -%s\n", value, name)
fail()
}
}