Commit ae0c4358 authored by Rob Pike's avatar Rob Pike
Browse files

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: default avatarIan Lance Taylor <iant@golang.org>
parent 95dda75b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment