-
Notifications
You must be signed in to change notification settings - Fork 369
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
Consider go1.13 errors package #414
Comments
Before doing this, we should think about what implementation details due to the errors API we want to make public (the blog post has more details on this topic). Also, https://github.com/fatih/errwrap might be helpful. |
/assign I can help with this. |
For reference, the blog post @corneliusweig mentioned is https://blog.golang.org/go1.13-errors |
Thanks. It would be good to see if we get Stack Traces like the current err pkg when run with -v 5 etc |
Thanks @erain. I got confused and thought that the link from @.ahmetb was the same 🤦♂️ |
I offered help to integrate errwrap into golangci-lint. It have it locally, will push upstream accordingly. |
@ferhatelmas would that make sense? My understanding is that it should be a deliberate choice to wrap or not to wrap (see blog.golang.org/go1.13-errors). A linter would simply report any such occurrence. |
I think yes because even if it's decided to wrap, people are error-prone and might forget putting Also, it helps in transition with |
But if I understand correctly, the decision to wrap or not is done on a case-by-case basis, right? |
Yes. Here is a reply to it from the famous blog post.
That's why it should be opt-in linter, false by default. |
Here's the criteria I expect from this new errors mechanism:
|
Promising new library: https://github.com/rotisserie/eris not sure if compatible with go1.13 errors but seems to have the same capabilities and nearly identical interface. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/unassign @erain I am really sorry but I don't have the bandwidth for working on this now. |
ping @robertvolkmann. You expressed some interest in this a while back, I think. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Go has introduced new error wrapping primitives. Especially the errors.Is check can be useful to krew in certain few locations that we rely on error type (ENOENT etc).
https://golang.org/doc/go1.13#error_wrapping
The text was updated successfully, but these errors were encountered: