strconv: ParseBool errors are verbose #29306
Labels
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Failure to parse a boolean flag results in this error:
https://play.golang.org/p/cBBLtiFyWhY:
invalid boolean value "garbage" for -b: strconv.ParseBool: parsing "garbage": invalid syntax
Room for improvement:
The other strconv.Parse* functions are similarly verbose. I've gotten into the habit of throwing away their errors and writing my own. e.g. "invalid int: %q".
The text was updated successfully, but these errors were encountered: