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

io: flatten nested MultiWriters #22431

Closed
crunk1 opened this issue Oct 25, 2017 · 2 comments
Closed

io: flatten nested MultiWriters #22431

crunk1 opened this issue Oct 25, 2017 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@crunk1
Copy link

crunk1 commented Oct 25, 2017

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

1.9.1

The rest of the issue template questions aren't that relevant.

The source code shows that nested MultiReaders flatten. Can we have the same for MultiWriters?

My use case is, without going into too much detail, sporadically adding io.Writers to a log.Logger. I have created an extendable Writer that can add new Writers, but it works by nesting MultiWriters. I don't anticipate having a ton of layers, but I think strategic flattening would save some computational overhead.

@gbbr gbbr changed the title Feature request: flatten nested io.MultiWriters. proposal: flatten nested io.MultiWriters. Oct 25, 2017
@gopherbot gopherbot added this to the Proposal milestone Oct 25, 2017
@ianlancetaylor ianlancetaylor changed the title proposal: flatten nested io.MultiWriters. proposal: io: flatten nested MultiWriters Oct 25, 2017
@ianlancetaylor
Copy link
Contributor

I'm going to drop this out of the proposal process. I think it's fine if someone wants to repeat https://golang.org/cl/17873 for MultiWriter.

@ianlancetaylor ianlancetaylor changed the title proposal: io: flatten nested MultiWriters io: flatten nested MultiWriters Oct 25, 2017
@ianlancetaylor ianlancetaylor added NeedsFix The path to resolution is known, but the work has not been done. and removed Proposal labels Oct 25, 2017
@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Unplanned Oct 25, 2017
@gopherbot
Copy link

Change https://golang.org/cl/73470 mentions this issue: io: flatten multiWriter.Write and WriteString when possible

@golang golang locked and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants