Skip to content

proposal: archive/tar: add Reader NextOffset() #75153

@champtar

Description

@champtar

Proposal Details

The goal of this proposal is to simplify implementing fs.FS() on top of archive/tar

There was 2 "soft" rejected requests to implement fs.FS():

I could find 4 implementations that could benefit from that:

The idea would be to add

func (tr *Reader) NextOffset() (*Header, int, error)

that also returns the offset in the io.Reader the Header was found at, so that if you Seek() to this offset and call Next() you end up with the same Header / data

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions