-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
refactor: using error is instead of == [skip changelog] #10093
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wont comment on all the occurences, but io.EOF
must never be wrapped because it was created before errors.Is
and there is way to much code that relies on ==
.
errors.Is
also generates garbage so we shouldn't use it unless it is realistical to trigger where ==
would not (so not io.EOF
).
@Jorropo so, I need to remove all |
|
@Jorropo its fixed |
@Jorropo can you have a review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last one please and lgtm
Co-authored-by: Jorropo <[email protected]>
@Jorropo donee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thx
I used
errors.Is()
instead of==
or!=
and also use the%w
for wrapped errors.