aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/reader.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2016-05-03 19:54:49 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2016-05-03 21:01:13 +0000
commit01182425f847e4c98a53c60d0994175e21fd06dd (patch)
treef2fc61c4c570ef8e310b6282db2f2e1630532649 /src/bytes/reader.go
parent15f7a66f3686d24fd5ad233c6c6b1ff22daa42ae (diff)
downloadgo-01182425f847e4c98a53c60d0994175e21fd06dd.tar.xz
strings, bytes: fix Reader 0 byte read at EOF
0 byte reads at EOF weren't returning EOF. Change-Id: I19b5fd5a72e83d49566a230ce4067be03f00d14b Reviewed-on: https://go-review.googlesource.com/22740 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/bytes/reader.go')
-rw-r--r--src/bytes/reader.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/bytes/reader.go b/src/bytes/reader.go
index aa39890f3b..83826c80c4 100644
--- a/src/bytes/reader.go
+++ b/src/bytes/reader.go
@@ -36,9 +36,6 @@ func (r *Reader) Len() int {
func (r *Reader) Size() int64 { return int64(len(r.s)) }
func (r *Reader) Read(b []byte) (n int, err error) {
- if len(b) == 0 {
- return 0, nil
- }
if r.i >= int64(len(r.s)) {
return 0, io.EOF
}