Skip to content
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

os: mention ErrInvalid for nil receivers #12391

Closed
dominikh opened this issue Aug 28, 2015 · 1 comment
Closed

os: mention ErrInvalid for nil receivers #12391

dominikh opened this issue Aug 28, 2015 · 1 comment

Comments

@dominikh
Copy link
Member

@dominikh dominikh commented Aug 28, 2015

Methods on *os.File return ErrInvalid when the receiver is nil. This is, however, not documented anywhere. Usually this would be fine, if it weren't for a lot of documentation on methods saying If there is an error, it will be of type *PathError.

Operating on nil *os.Files is a programming mistake and shouldn't be a common occurence, so it shouldn't complicate all of the documentation. However, a note in the package-level documentation could be an easy fix for a small inaccuracy in the rest of the documentation.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Aug 28, 2015
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 12, 2015

CL https://golang.org/cl/16873 mentions this issue.

@minux minux closed this in 85ca578 Nov 13, 2015
@golang golang locked and limited conversation to collaborators Nov 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.