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: Missing Reader.Read doc #17374

Closed
willfaught opened this issue Oct 7, 2016 · 9 comments
Closed

compress/gzip: Missing Reader.Read doc #17374

willfaught opened this issue Oct 7, 2016 · 9 comments

Comments

@willfaught
Copy link
Contributor

Non-trivial method with no documentation.

@odeke-em
Copy link
Member

odeke-em commented Oct 7, 2016

/cc @dsnet.

@willfaught we recently added some examples to tip https://tip.golang.org/pkg/compress/gzip/#pkg-examples so they won't yet be on https://golang.org until the next major release, so for now perhaps that could be of use, before documentation for that method is in?

@willfaught
Copy link
Contributor Author

Thanks. I think I figured it out, but it'll help the next person.

By examples, do you mean actual worded documentation like the rest of the methods there, or code in a doc comment, or actual example functions?

On Oct 6, 2016, at 11:30 PM, Emmanuel T Odeke notifications@github.com wrote:

/cc @dsnet.

@willfaught we recently added some examples to tip https://tip.golang.org/pkg/compress/gzip/#Reader.Read so they won't yet be on https://golang.org until the next major release, so for now perhaps that could be of use, before documentation for that method is in?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@odeke-em
Copy link
Member

odeke-em commented Oct 7, 2016

By examples, I meant snippets of runnable code in the godoc.

@willfaught
Copy link
Contributor Author

OK

I think Read should still have its own proper godoc comment like the other methods.

On Oct 7, 2016, at 12:39 AM, Emmanuel T Odeke notifications@github.com wrote:

By examples, I meant snippets of runnable code in the godoc.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@bradfitz
Copy link
Contributor

bradfitz commented Oct 7, 2016

We often don't document implementations of common interface methods, unless there's something notable to say.

Does this reader do something special over a typical io.Reader?

@bradfitz bradfitz added this to the Go1.8Maybe milestone Oct 7, 2016
@dsnet
Copy link
Member

dsnet commented Oct 7, 2016

Does this reader do something special over a typical io.Reader?

Nope.

I'm not opposed to documenting it either, though.

@odeke-em, want to write a single documentation sentence for it?

@odeke-em
Copy link
Member

odeke-em commented Oct 7, 2016

@dsnet thanks. For sure I'd love to do that. If it is urgent please go ahead and add it, otherwise I'll be able to submit a patch in about 9 hours when am back home from work.

@willfaught
Copy link
Contributor Author

I was unsure at first whether this Read read into or out of the param. The two Readers involved confused me. In that context, I didn't recognize it as an io.Reader.Read method. Makes sense when you recognize that.

On Oct 7, 2016, at 8:03 AM, Brad Fitzpatrick notifications@github.com wrote:

We often don't document implementations of common interface methods, unless there's something notable to say.

Does this reader do something special over a typical io.Reader?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Oct 9, 2017
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

5 participants