-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
context: DeadlineExceeded silently implements net.Error #45818
Comments
@gopherbot documentation |
/cc @neild who recently filled a somewhat related proposal |
the implementation is intentional #14238 |
I guess I don't see why it's interesting to specifically document this fact. How does that help people? |
It's interesting to me to document that DeadlineExceeded implements net.Error and returns true for I went looking for documentation on whether DeadlineExceeded is a Temporary error (I could see arguments either way), and wound up here. It would be great to have this in the official documentation rather than a GitHub issue. Edit: I see now that Temporary is deprecated as of Go 1.18, in favor of Timeout. I believe the same arguments above apply to Timeout. |
It seems obvious to me that So the question is whether |
Direct comparison to |
It is not - probably historical reasons. There has been an attempt to change it. |
The fact that context.DeadlineExceeded implements net.Error with both
Timeout()
andTemporary()
returningtrue
is not visible in the public documentation.I guess it is way too late to remove those methods, so I propose to mention that fact in the documentation.
The text was updated successfully, but these errors were encountered: