-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: add WriteString support to io.MultiWriter #11805
Comments
I must be missing something. |
CL https://golang.org/cl/12485 mentions this issue. |
@cespare @bradfitz that was fast. :) I thought I was going to have more time to poke around and check the rest of the writers, particular net/http's default responseWriter. |
net/http's responseWriter already does WriteString: func (w *response) Write(data []byte) (n int, err error) {
return w.write(len(data), data, "")
}
func (w *response) WriteString(data string) (n int, err error) {
return w.write(len(data), nil, data)
}
// either dataB or dataS is non-zero.
func (w *response) write(lenData int, dataB []byte, dataS string) (n int, err error) { |
No API changes necessary.
Are there any other writers in the stdlib that should have WriteString implemented as well?
The text was updated successfully, but these errors were encountered: