-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
io: unify EOF documentation for ReadFrom and WriteTo #44475
Conversation
This PR (HEAD: d3c1c31) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/294769 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/294769. |
d3c1c31
to
19af36b
Compare
This PR (HEAD: 19af36b) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/294769 to see it. Tip: You can toggle comments from me using the |
Message from Aleksa Sarai: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/294769. |
Because io.Copy delegates to WriteTo and ReadFrom if possible, implementors need to be made aware that the EOF behaviour of WriteTo and ReadFrom need to match the io.Copy semantics (do not return io.EOF -- even if no bytes are read). In addition, the documentation of the two interfaces had diverged slightly, so re-unify the wording. Fixes golang#44411
19af36b
to
32dd90e
Compare
This PR (HEAD: 32dd90e) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/294769 to see it. Tip: You can toggle comments from me using the |
Message from Aleksa Sarai: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/294769. |
Message from Russ Cox: Patch Set 4: Code-Review-2 (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/294769. |
Because io.Copy delegates to WriteTo and ReadFrom if possible,
implementors need to be made aware that the EOF behaviour of WriteTo and
ReadFrom need to match the io.Copy semantics (do not return io.EOF --
even if no bytes are read).
In addition, the documentation of the two interfaces had diverged
slightly, so re-unify the wording.
Fixes #44411