diff --git a/common/redisclient.go b/common/redisclient.go index 784b327..3c53d60 100644 --- a/common/redisclient.go +++ b/common/redisclient.go @@ -70,10 +70,6 @@ func (client *RedisClient) writeHSpatial(p1, p2 int64) (err error) { return } -func (client *RedisClient) readLine() (data []byte, err error) { - return client.reader.ReadBytes('\n') -} - func isError(line []byte) error { if len(line) > 0 && line[0] == '-' { return fmt.Errorf("error: %s", line[1:]) @@ -83,7 +79,7 @@ func isError(line []byte) error { func (client *RedisClient) readBulkString(data *[]byte) (size int, err error) { var line []byte - if line, err = client.readLine(); err != nil { + if line, err = client.reader.ReadBytes('\n'); err != nil { return } if err = isError(line); err != nil {