commit | 21e1ffe7bc7793a8f1c1fca4dfa32f1f3f70681c | [log] [tgz] |
---|---|---|
author | Carlo Alberto Ferraris <cafxx@strayorange.com> | Fri Jan 21 14:21:38 2022 +0900 |
committer | Gopher Robot <gobot@golang.org> | Thu Apr 21 23:41:03 2022 +0000 |
tree | 3b9a681cd6bc0cb345e47195d745ce7440096fac | |
parent | 01837ca7eb7d83dcbf760c032e1b25320f200510 [diff] |
bufio: implement large write forwarding in Writer.WriteString Currently bufio.Writer implements forwarding to the underlying Writer for large writes via Write, but it does not do the same for large writes via WriteString. If the underlying Writer is also a StringWriter, use the same "large writes" logic also in WriteString while taking care to only check once per call to WriteString whether the underlying Writer implements StringWriter. Change-Id: Id81901c07b035936816b9e41b1f5688e699ee8e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/380074 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.