1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-19 07:22:17 +03:00
go-redis/utils.go
2012-08-09 13:12:41 +03:00

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
}