]> Cypherpunks repositories - gostls13.git/commit
io: clarify documentation for io.ByteReader on error values
authorsmasher164 <contact@akhilindurti.com>
Wed, 28 Jun 2017 08:22:25 +0000 (04:22 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Jun 2017 23:03:18 +0000 (23:03 +0000)
commit7e99ccb52b9c921f2e088cd1b9634ed15ce3d4ea
tree04c0eadc6e4b030314d2e9ba00e86e7ea7ea3d41
parent25de52eb57e085fae854f6162c42482f6703d5ff
io: clarify documentation for io.ByteReader on error values

Document that the byte value returned by ReadByte() is meaningless
if its error != nil. Because io.Reader and io.ByteReader are similar in
name, this CL aims to clear up any ambiguity surrounding the returned
values, particularly where io.Reader is allowed to return both a
non-zero number of valid bytes and err == EOF.

Fixes #20825

Change-Id: I3a23c18c80c471c0caae3b4d2f6f8e547da0bed9
Reviewed-on: https://go-review.googlesource.com/46950
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/io/io.go