mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: use SeekStart, SeekCurrent, SeekEnd
CL/19862 (f79b50b8d5) 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>
This commit is contained in:
parent
6db98a3c51
commit
acc757f678
27 changed files with 72 additions and 64 deletions
|
|
@ -189,7 +189,7 @@ func ExampleSectionReader_Seek() {
|
|||
r := strings.NewReader("some io.Reader stream to be read\n")
|
||||
s := io.NewSectionReader(r, 5, 16)
|
||||
|
||||
if _, err := s.Seek(10, 0); err != nil {
|
||||
if _, err := s.Seek(10, io.SeekStart); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue