From 750e7e86d5d9b985fae7f2329fd219cacf72a62b Mon Sep 17 00:00:00 2001 From: sandyskies Date: Tue, 22 Oct 2019 01:24:06 +0800 Subject: [PATCH] io: make CopyBuffer docs state when buf is not used Document that if either src implements the WriteTo interface or if dst implements the ReaderFrom interface, then buf will not be used. Fixes #32276 --- src/io/io.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/io.go b/src/io/io.go index 7c3539ac88..9cc3086c19 100644 --- a/src/io/io.go +++ b/src/io/io.go @@ -369,7 +369,7 @@ func Copy(dst Writer, src Reader) (written int64, err error) { // temporary one. If buf is nil, one is allocated; otherwise if it has // zero length, CopyBuffer panics. // -// If either src implements WriterTo or if dst implements ReaderFrom, +// 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 {