-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Misleading documentation on status.FromError #4066
Comments
Thanks for the suggestion. I would probably tweak that a bit and write it as:
That this happens by returning |
@dfawley I think your changes make a lot of sense because they mention what it is really about: the returned nil will claim "codes.OK" regardless if that was really the code and that's not necessarily what a programmer expect when calling with err=nil. I would write it then like that (complete docstring):
|
My point is: the pointer returned by |
@dfawley Can I take this up? |
Thanks, @gauravgahlot |
The current documentation is:
The first statement is not true because the implementation does return
nil, true
if theerr
is nil.The documentation could be improved to avoid that this function is used in wrong ways when not looking at the actual implementation.
What did you expect to see?
The text was updated successfully, but these errors were encountered: