diff --git a/src/bytes/buffer.go b/src/bytes/buffer.go index 67771846fc4..dc9d5e95d32 100644 --- a/src/bytes/buffer.go +++ b/src/bytes/buffer.go @@ -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 "". +// +// To build strings more efficiently, see the strings.Builder type. func (b *Buffer) String() string { if b == nil { // Special case, useful in debugging.