forked from mirrors/tar-split
all: use new io.SeekFoo constants instead of os.SEEK_FOO
Automated change. Fixes #15269 Change-Id: I8deb2ac0101d3f7c390467ceb0a1561b72edbb2f Reviewed-on: https://go-review.googlesource.com/21962 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
e16c946914
commit
67735b8612
1 changed files with 2 additions and 3 deletions
|
@ -13,7 +13,6 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math"
|
"math"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
@ -566,10 +565,10 @@ func (tr *Reader) skipUnread() error {
|
||||||
// io.Seeker, but calling Seek always returns an error and performs
|
// io.Seeker, but calling Seek always returns an error and performs
|
||||||
// no action. Thus, we try an innocent seek to the current position
|
// no action. Thus, we try an innocent seek to the current position
|
||||||
// to see if Seek is really supported.
|
// to see if Seek is really supported.
|
||||||
pos1, err := sr.Seek(0, os.SEEK_CUR)
|
pos1, err := sr.Seek(0, io.SeekCurrent)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
// Seek seems supported, so perform the real Seek.
|
// Seek seems supported, so perform the real Seek.
|
||||||
pos2, err := sr.Seek(dataSkip-1, os.SEEK_CUR)
|
pos2, err := sr.Seek(dataSkip-1, io.SeekCurrent)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tr.err = err
|
tr.err = err
|
||||||
return tr.err
|
return tr.err
|
||||||
|
|
Loading…
Reference in a new issue