go/src/flag
Rob Pike ae0c435877 flag: return a consistent parse error if the flag value is invalid
Return a consistently formatted error string that reports either
a parse error or a range error.

Before:
	invalid boolean value "3" for -debug: strconv.ParseBool: parsing "3": invalid syntax

After:
	invalid boolean value "3" for -debug: parse error

Fixes #26822

Change-Id: I60992bf23da32a4c0cf32472a8af486a3c9674ad
Reviewed-on: https://go-review.googlesource.com/c/143257
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-10-19 03:48:38 +00:00
..
example_test.go
example_value_test.go flag: add a Value example 2018-06-21 23:32:53 +00:00
export_test.go
flag.go flag: return a consistent parse error if the flag value is invalid 2018-10-19 03:48:38 +00:00
flag_test.go flag: return a consistent parse error if the flag value is invalid 2018-10-19 03:48:38 +00:00