diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-05-03 19:54:49 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-05-03 21:01:13 +0000 |
| commit | 01182425f847e4c98a53c60d0994175e21fd06dd (patch) | |
| tree | f2fc61c4c570ef8e310b6282db2f2e1630532649 /src/strings/reader.go | |
| parent | 15f7a66f3686d24fd5ad233c6c6b1ff22daa42ae (diff) | |
| download | go-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/strings/reader.go')
| -rw-r--r-- | src/strings/reader.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/strings/reader.go b/src/strings/reader.go index 74eed4d574..e254837c63 100644 --- a/src/strings/reader.go +++ b/src/strings/reader.go @@ -35,9 +35,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 } |
