mirror of
https://github.com/redis/go-redis.git
synced 2025-04-19 07:22:17 +03:00
17 lines
234 B
Go
17 lines
234 B
Go
package redis
|
|
|
|
import (
|
|
"bufio"
|
|
)
|
|
|
|
func readLine(rd *bufio.Reader) ([]byte, error) {
|
|
line, isPrefix, err := rd.ReadLine()
|
|
if err != nil {
|
|
return line, err
|
|
}
|
|
if isPrefix {
|
|
return line, ErrReaderTooSmall
|
|
}
|
|
return line, nil
|
|
}
|