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

proposal: io, net: implement WriterTo for pipes #34624

Open
Stebalien opened this issue Sep 30, 2019 · 1 comment · May be fixed by #32125

Comments

@Stebalien
Copy link

commented Sep 30, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13 linux/amd64

Description

Currently, io.Copy(pipew, piper) requires an intermediate buffer and an intermediate copy. Implementing WriteTo on pipes would allow writes to be forwarded directly to the writer with no intermediate copies.

Implementation: #32125

@gopherbot gopherbot referenced a pull request that will close this issue Sep 30, 2019
@andybons andybons changed the title {io, net}: implement WriterTo for pipes proposal: {io, net}: implement WriterTo for pipes Sep 30, 2019
@gopherbot gopherbot added this to the Proposal milestone Sep 30, 2019
@gopherbot gopherbot added the Proposal label Sep 30, 2019
@odeke-em odeke-em changed the title proposal: {io, net}: implement WriterTo for pipes proposal: io, net: implement WriterTo for pipes Oct 2, 2019
Stebalien added a commit to Stebalien/go that referenced this issue Oct 6, 2019
Implements the WriterTo interface for io pipes to avoid intermediate buffers
when copying with `io.Copy`.

Updates golang#34624
Stebalien added a commit to Stebalien/go that referenced this issue Oct 6, 2019
Implements the WriterTo interface for net pipes to avoid intermediate buffers
when copying with `io.Copy`.

Fixes golang#34624
@gopherbot

This comment has been minimized.

Copy link

commented Oct 7, 2019

Change https://golang.org/cl/177977 mentions this issue: io, net: implement WriterTo for pipes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.