summaryrefslogtreecommitdiff
path: root/src/io/io_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: use SeekStart, SeekCurrent, SeekEndJoe Tsai2016-05-061-2/+2
| | | | | | | | | | | | | | CL/19862 (f79b50b8d5bc159561c1dcf7c17e2a0db96a9a11) recently introduced the constants SeekStart, SeekCurrent, and SeekEnd to the io package. We should use these constants consistently throughout the code base. Updates #15269 Change-Id: If7fcaca7676e4a51f588528f5ced28220d9639a2 Reviewed-on: https://go-review.googlesource.com/22097 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Joe Tsai <joetsai@digital-static.net> TryBot-Result: Gobot Gobot <gobot@golang.org>
* io: add CopyBuffer, a version of Copy in which the user provides a bufferRob Pike2015-04-151-1/+21
| | | | | | | | | 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>
* io: clarify Copy docs regarding error handlingPéter Surányi2015-04-081-0/+28
| | | | | | | | | | | | | "returns ... the first error" was misleading or at least confusing: in case a Read results in an error with non-zero bytes read, and the subsequent Write also results in an error, the error from Write is returned, which is the second one (in the temporal dimension). Fixes #9744 Change-Id: If8925a701e4fae820cd9df7446503403fc0785d4 Reviewed-on: https://go-review.googlesource.com/3686 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* build: move package sources from src/pkg to srcRuss Cox2014-09-081-0/+341
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.