What version of Go are you using (go version)?
$ go version
go version go1.12.5 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
What did you do?
The code: https://play.golang.org/p/JvKpGINHHBY
What did you expect to see?
Not a panic.
The panic doesn't happen if you read from an *os.File, *bufio.Reader or *bytes.Reader, it only happens with the Zip files because it prematurely returns the io.EOF error.
What did you see instead?
A panic.
Edit
https://go-review.googlesource.com/c/go/+/184122
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env)?$ go env
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
What did you do?
The code: https://play.golang.org/p/JvKpGINHHBY
What did you expect to see?
Not a panic.
The panic doesn't happen if you read from an *os.File, *bufio.Reader or *bytes.Reader, it only happens with the Zip files because it prematurely returns the io.EOF error.
What did you see instead?
A panic.
Edit
https://go-review.googlesource.com/c/go/+/184122