Skip to content

Commit aae0bef

Browse files
ianlancetaylorgopherbot
authored andcommitted
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>
1 parent b3b8d2b commit aae0bef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/archive/zip/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (z *Reader) init(r io.ReaderAt, size int64) error {
133133
if _, err = rs.Seek(int64(end.directoryOffset), io.SeekStart); err != nil {
134134
return err
135135
}
136-
buf = bufio.NewReader(rs)
136+
buf.Reset(rs)
137137
continue
138138
}
139139

0 commit comments

Comments
 (0)