mirror of
https://github.com/redis/go-redis.git
synced 2025-08-07 12:42:55 +03:00
internal/proto: cleanup bufio reader
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package proto
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"strconv"
|
||||
@@ -54,13 +53,10 @@ func (r *Reader) ReadN(n int) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (r *Reader) ReadLine() ([]byte, error) {
|
||||
line, isPrefix, err := r.src.ReadLine()
|
||||
line, err := r.src.ReadLine()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if isPrefix {
|
||||
return nil, bufio.ErrBufferFull
|
||||
}
|
||||
if len(line) == 0 {
|
||||
return nil, fmt.Errorf("redis: reply is empty")
|
||||
}
|
||||
|
Reference in New Issue
Block a user