-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flag: Error wrapping is missing from the flag package #55097
Comments
That's not how |
Hi ianlancetaylor, thank you for your response. I am aware that the Line 1088 in 36760ca
I would expect that the error was wrapped by using |
Consider opening a new issue requesting that the flag package shall return a new kind of error in case a |
Today I can't see any reason for the flag package to use |
There are cases like |
Isn't the code sample posted by OP on the Go Playground another example of a user-controller error type returned eventually through |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/SVo8u-vFr3T
What did you expect to see?
No output as the underlying error is the same.
What did you see instead?
The errors do not match as the error returned from
Value.Set
is not wrapped using%w
in(*FlagSet).parseOne
go/src/flag/flag.go
Line 1088 in 36760ca
The text was updated successfully, but these errors were encountered: