aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/reader.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytes/reader.go')
-rw-r--r--src/bytes/reader.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bytes/reader.go b/src/bytes/reader.go
index b89d1548f1..5941ebdab4 100644
--- a/src/bytes/reader.go
+++ b/src/bytes/reader.go
@@ -63,14 +63,14 @@ func (r *Reader) ReadAt(b []byte, off int64) (n int, err error) {
return
}
-func (r *Reader) ReadByte() (b byte, err error) {
+func (r *Reader) ReadByte() (byte, error) {
r.prevRune = -1
if r.i >= int64(len(r.s)) {
return 0, io.EOF
}
- b = r.s[r.i]
+ b := r.s[r.i]
r.i++
- return
+ return b, nil
}
func (r *Reader) UnreadByte() error {