mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
bytes: correct comment about usage of bytes.Buffer by Printf
The fmt package does not use bytes.Buffer anymore as an internal buffer. Change-Id: I34c7a52506290ccbcb10ea2e85dea49a0a8b8203 Reviewed-on: https://go-review.googlesource.com/20511 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
92dfc12610
commit
ac1608a2f9
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ type Buffer struct {
|
||||||
buf []byte // contents are the bytes buf[off : len(buf)]
|
buf []byte // contents are the bytes buf[off : len(buf)]
|
||||||
off int // read at &buf[off], write at &buf[len(buf)]
|
off int // read at &buf[off], write at &buf[len(buf)]
|
||||||
runeBytes [utf8.UTFMax]byte // avoid allocation of slice on each call to WriteRune
|
runeBytes [utf8.UTFMax]byte // avoid allocation of slice on each call to WriteRune
|
||||||
bootstrap [64]byte // memory to hold first slice; helps small buffers (Printf) avoid allocation.
|
bootstrap [64]byte // memory to hold first slice; helps small buffers avoid allocation.
|
||||||
lastRead readOp // last read operation, so that Unread* can work correctly.
|
lastRead readOp // last read operation, so that Unread* can work correctly.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue