summaryrefslogtreecommitdiff
path: root/libgo/go/io/io.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/io/io.go')
-rw-r--r--libgo/go/io/io.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/io/io.go b/libgo/go/io/io.go
index 2010770e6a4..9cc3086c19b 100644
--- a/libgo/go/io/io.go
+++ b/libgo/go/io/io.go
@@ -368,6 +368,9 @@ func Copy(dst Writer, src Reader) (written int64, err error) {
// provided buffer (if one is required) rather than allocating a
// temporary one. If buf is nil, one is allocated; otherwise if it has
// zero length, CopyBuffer panics.
+//
+// If either src implements WriterTo or dst implements ReaderFrom,
+// buf will not be used to perform the copy.
func CopyBuffer(dst Writer, src Reader, buf []byte) (written int64, err error) {
if buf != nil && len(buf) == 0 {
panic("empty buffer in io.CopyBuffer")