]> Cypherpunks repositories - gostls13.git/commit
io: clarify Copy docs regarding error handling
authorPéter Surányi <speter.go1@gmail.com>
Mon, 2 Feb 2015 12:37:52 +0000 (21:37 +0900)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 8 Apr 2015 13:39:33 +0000 (13:39 +0000)
commita814c05ebac9409caed705900c8c06c09e36cba2
treeb5e6c4dfcb13a48fbb73129bb921ccfccf28d55b
parent8ac129e5304c6d16b4562c3f13437765d7c8a184
io: clarify Copy docs regarding error handling

"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>
src/io/io.go
src/io/io_test.go