aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/buffer.go
diff options
context:
space:
mode:
authorAlan Donovan <adonovan@google.com>2015-07-23 12:07:58 -0400
committerAlan Donovan <adonovan@google.com>2015-07-23 16:59:20 +0000
commitb1177d390cf0c3733836e5941f77b828e21c8a09 (patch)
tree741f916151b45bf59300caf756cf06c566c621c9 /src/bytes/buffer.go
parent2584974d166c54e81a4480625e6b99a4f2630c39 (diff)
downloadgo-b1177d390cf0c3733836e5941f77b828e21c8a09.tar.xz
bytes: document that Buffer values must not be copied
Change-Id: If0821a2af987b78ed8024b40d9ffa68032518b22 Reviewed-on: https://go-review.googlesource.com/12572 Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/bytes/buffer.go')
-rw-r--r--src/bytes/buffer.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bytes/buffer.go b/src/bytes/buffer.go
index 4db93867d9..75dab13048 100644
--- a/src/bytes/buffer.go
+++ b/src/bytes/buffer.go
@@ -14,6 +14,7 @@ import (
// A Buffer is a variable-sized buffer of bytes with Read and Write methods.
// The zero value for Buffer is an empty buffer ready to use.
+// Buffer values must not be copied.
type Buffer struct {
buf []byte // contents are the bytes buf[off : len(buf)]
off int // read at &buf[off], write at &buf[len(buf)]