mirror of https://github.com/golang/go.git
archive/zip: use bufio.Reset rather than NewReader
A clean up for CL 408734, suggested by Joe Tsai. Change-Id: Ida9db0b8d31785d5640938c286c9c6c82c27f457 Reviewed-on: https://go-review.googlesource.com/c/go/+/410154 Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
This commit is contained in:
parent
b3b8d2bfeb
commit
aae0bef72f
|
|
@ -133,7 +133,7 @@ func (z *Reader) init(r io.ReaderAt, size int64) error {
|
||||||
if _, err = rs.Seek(int64(end.directoryOffset), io.SeekStart); err != nil {
|
if _, err = rs.Seek(int64(end.directoryOffset), io.SeekStart); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
buf = bufio.NewReader(rs)
|
buf.Reset(rs)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue