Skip to content

embed: guarantee (*FS).Open's returning value implements io.Seeker #45745

@hajimehoshi

Description

@hajimehoshi

From the current document, there is no guarantee whether (*embed.FS).Open's returning value implements io.Seeker or not.

Open opens the named file for reading and returns it as an fs.File.

IIUC the returned value always implements io.Seeker in the current implementation, and actually it is fine to assume this (e.g., #44175 (comment)). Would it be possible to make the current behavior explicit in the document?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions