Skip to content

os: mention ErrInvalid for nil receivers #12391

Closed
@dominikh

Description

@dominikh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions