Closed trim21 closed 3 years ago
this should be good:
type CompressedFile struct { reader *bytes.Reader zipPath string } func (c CompressedFile) Read(p []byte) (int, error) { n, err := c.reader.Read(p) if err == io.EOF { // report error here return n, io.EOF } return n, errors.Wrapf(err, "can't read from reader %s", c.zipPath) }
( and yes, I know I should use io.Reader here instead of *bytes.Reader...
io.Reader
*bytes.Reader
Thanks for reporting!
this should be good:
( and yes, I know I should use
io.Reader
here instead of*bytes.Reader
...