Skip to content

Commit 750e7e8

Browse files
committed
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
1 parent 1b541b4 commit 750e7e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/io/io.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func Copy(dst Writer, src Reader) (written int64, err error) {
369369
// temporary one. If buf is nil, one is allocated; otherwise if it has
370370
// zero length, CopyBuffer panics.
371371
//
372-
// If either src implements WriterTo or if dst implements ReaderFrom,
372+
// If either src implements WriterTo or dst implements ReaderFrom,
373373
// buf will not be used to perform the copy.
374374
func CopyBuffer(dst Writer, src Reader, buf []byte) (written int64, err error) {
375375
if buf != nil && len(buf) == 0 {

0 commit comments

Comments
 (0)