Commit ed8b7ded authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

bytes: mention strings.Builder in Buffer.String docs

Fixes #22778

Change-Id: I37f7a59c15828aa720fe787fff42fb3ef17729c7
Reviewed-on: https://go-review.googlesource.com/80815Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent a631daba
......@@ -56,6 +56,8 @@ func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }
// String returns the contents of the unread portion of the buffer
// as a string. If the Buffer is a nil pointer, it returns "<nil>".
//
// To build strings more efficiently, see the strings.Builder type.
func (b *Buffer) String() string {
if b == nil {
// Special case, useful in debugging.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment