Open
Description
Copying @bradfitz's comment #17920 (comment) into a separate proposal.
For Go 2 we should consider changing the Seek
method to just take a file position, not a whence argument. We should consider adding SeekFromCurrent
and SeekFromEnd
, though I suspect they are unnecessary. We should change Seeker
similarly. We should remove io.SeekStart
, io,SeekCurrent
, and io.SeekEnd
.
Rationale: the current Seek
method is copied from C. It presents three different interfaces, and doesn't make much sense as a single method in Go. People who implement the io.Seeker
interface often only implement it for io.SeekStart
, and do not correctly handle the other possible values.
See also #17920, which this would replace.