]> Cypherpunks repositories - gostls13.git/commit
io: add CopyBuffer, a version of Copy in which the user provides a buffer
authorRob Pike <r@golang.org>
Thu, 9 Apr 2015 23:03:12 +0000 (16:03 -0700)
committerRob Pike <r@golang.org>
Wed, 15 Apr 2015 15:59:16 +0000 (15:59 +0000)
commit2c89992f445a631da250517d6f9b9fcd7852872e
tree02e9252258daca674609feabbe5eb465a4ea6c9c
parent888d44d3c16147019bb5a667b40bc68ecf4e7ba3
io: add CopyBuffer, a version of Copy in which the user provides a buffer

This trivial addition to the io package makes it easy to control the
buffer size and allocation properties of io.Copy.

Change-Id: Ica1a6bd015e429d4e655bc0c6f66cea21c454acf
Reviewed-on: https://go-review.googlesource.com/8730
Reviewed-by: Russ Cox <rsc@golang.org>
src/io/io.go
src/io/io_test.go