You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CL/19862 (f79b50b) recently introduced the constants
SeekStart, SeekCurrent, and SeekEnd to the io package. We should use these constants
consistently throughout the code base.
Updates #15269
Change-Id: If7fcaca7676e4a51f588528f5ced28220d9639a2
Reviewed-on: https://go-review.googlesource.com/22097
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Joe Tsai <joetsai@digital-static.net>
TryBot-Result: Gobot Gobot <gobot@golang.org>
In acefcb7 three new constants were added for seeking positions in a stream of bytes.
bytes.Reader, strings.Reader, and io.SectionReader currently do not use these constants and instead use 0, 1, and 2.
Since packages bytes and strings (and by default io) all import io, it'd make sense to use those constants internally for their Readers'
Seek
methods.IMO it doesn't make sense to import io into any other packages for the sake of using named constants.
It's a rather trivial issue but it would clarify the source code which iirc was one of the reasons for having defined constants.
The text was updated successfully, but these errors were encountered: