You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface for the compress/bzip2 subpackage is currently
func NewReader(r io.Reader) io.Reader
Note it does not return any error data - in fact you can't tell if it's going to read the file until you actually try to read. Contrast to the gzip subpackage:
func NewReader(r io.Reader) (*Reader, error)
It looks from the current state of things that its not been decided which direction the compression code wants to go with its interfaces, but IMHO favoring an early error return would be better.
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
compress/bzip2 has an inconsistent interface to other compress functions
compress/bzip2: an inconsistent interface to other compress functions
Jun 2, 2015
mikioh
added
the
v2
A language change or incompatible library change
label
Jun 2, 2015
The interface for the compress/bzip2 subpackage is currently
Note it does not return any error data - in fact you can't tell if it's going to read the file until you actually try to read. Contrast to the gzip subpackage:
It looks from the current state of things that its not been decided which direction the compression code wants to go with its interfaces, but IMHO favoring an early error return would be better.
The text was updated successfully, but these errors were encountered: