Skip to content

Support Seek() in fs.FS runfiles implementation #4444

@mering

Description

@mering

Currently the fs.FS.Open() call returns an fs.File interface which does provide the .Seek() method. Return an interface inheriting from both fs.File and io.Seeker and provide the .Seek() method in the renamedFileInfo struct in fs.go.

Note: This approach is also used by the core http package, see golang/go#66877.
Example: https://gotipplay.golang.org/p/o9ABZj7Sfx6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions