From b6bfe468b779bf270b91d34d62d450fb1ac1c070 Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Fri, 24 Feb 2017 21:23:04 +0100 Subject: [PATCH] For symmetry inline readline function in redis client. --- common/redisclient.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 {