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

Return error of ReadInfo() #14

Open
glaslos opened this issue May 16, 2018 · 1 comment
Open

Return error of ReadInfo() #14

glaslos opened this issue May 16, 2018 · 1 comment

Comments

@glaslos
Copy link
Contributor

glaslos commented May 16, 2018

What is the reasoning behind not returning the error here?

func (d *Decoder) ReadInfo() {
	d.err = d.readHeaders()
}
@mattetti
Copy link
Member

@glaslos not a great reason, the idea is that d.Err() is usually the safe way to check for errors, in this case, I think we should change the API to also return an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants