Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compress/bzip2: an inconsistent interface to other compress functions #11026

Closed
wrouesnel opened this issue Jun 1, 2015 · 1 comment
Closed
Labels
FrozenDueToAge v2 A language change or incompatible library change

Comments

@wrouesnel
Copy link

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.

@bradfitz
Copy link
Contributor

bradfitz commented Jun 1, 2015

Unfortunately the API is frozen per the Go 1.x compatibility promise: https://golang.org/doc/go1compat

@bradfitz bradfitz closed this as completed Jun 1, 2015
@mikioh 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 mikioh added the v2 A language change or incompatible library change label Jun 2, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge v2 A language change or incompatible library change
Projects
None yet
Development

No branches or pull requests

4 participants