proposal: io: SeekStart, SeekCurrent, SeekEnd should have explicit types #17920
Labels
FrozenDueToAge
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Proposal
v2
An incompatible library change
Milestone
The os package defines
For #6885, these were deprecated and recreated in package io. This change does make sense, since io defines the Seeker interface. However, the recreation in package io in golang.org/cl/19862 (acefcb7) is less safe to use than the original in package os, because the explicit int types were dropped:
This is a mistake and does not compile:
This is a mistake but DOES compile:
(It seeks to byte 2 of the file.)
It would be nice if we can fix this at some point by making those constants have type int. Maybe Go 2.
The text was updated successfully, but these errors were encountered: