aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/buffer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytes/buffer.go')
-rw-r--r--src/bytes/buffer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytes/buffer.go b/src/bytes/buffer.go
index f135b46959..1aed86924d 100644
--- a/src/bytes/buffer.go
+++ b/src/bytes/buffer.go
@@ -293,14 +293,14 @@ func (b *Buffer) Next(n int) []byte {
// ReadByte reads and returns the next byte from the buffer.
// If no byte is available, it returns error io.EOF.
-func (b *Buffer) ReadByte() (c byte, err error) {
+func (b *Buffer) ReadByte() (byte, error) {
b.lastRead = opInvalid
if b.off >= len(b.buf) {
// Buffer is empty, reset to recover space.
b.Truncate(0)
return 0, io.EOF
}
- c = b.buf[b.off]
+ c := b.buf[b.off]
b.off++
b.lastRead = opRead
return c, nil