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/143257Reviewed-by: Ian Lance Taylor <iant@golang.org>
Showing
Please
register
or
sign in
to comment