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/gzip: does not document when Reader.Header is valid #13211

Closed
dsnet opened this issue Nov 11, 2015 · 3 comments
Closed

compress/gzip: does not document when Reader.Header is valid #13211

dsnet opened this issue Nov 11, 2015 · 3 comments

Comments

@dsnet
Copy link
Member

dsnet commented Nov 11, 2015

Using go1.5

Is Reader.Header valid after NewReader or after the first Reader.Read?

The code clearly shows that the Reader.Header is read during NewReader and Reader.Reset, but the documentation does not mention when it is valid.

@rakyll
Copy link
Contributor

rakyll commented Nov 11, 2015

It is valid after NewReader. I don't think we should document anything. In Go, it is useful to document if there is extra work needs to be done before making a call. Unless it is documented, it should just work if APIs allow you to make the call.

@rakyll rakyll closed this as completed Nov 11, 2015
@bradfitz
Copy link
Contributor

I think this is a valid documentation request.

@bradfitz bradfitz reopened this Nov 12, 2015
@bradfitz bradfitz added this to the Go1.6 milestone Nov 12, 2015
@gopherbot
Copy link

CL https://golang.org/cl/16838 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants