From 61e0d1d527febc418ef5ec167ed5b090c88f2470 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco <vladimir.webdev@gmail.com> Date: Wed, 14 Aug 2019 10:24:13 +0300 Subject: [PATCH] internal/proto: util util.Atoi --- internal/proto/reader.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/proto/reader.go b/internal/proto/reader.go index a48f1ae7..3ab4a73e 100644 --- a/internal/proto/reader.go +++ b/internal/proto/reader.go @@ -4,7 +4,6 @@ import ( "bufio" "fmt" "io" - "strconv" "github.com/go-redis/redis/v7/internal/util" ) @@ -134,7 +133,7 @@ func (r *Reader) readStringReply(line []byte) (string, error) { return "", Nil } - replyLen, err := strconv.Atoi(string(line[1:])) + replyLen, err := util.Atoi(line[1:]) if err != nil { return "", err } @@ -259,7 +258,7 @@ func (r *Reader) _readTmpBytesReply(line []byte) ([]byte, error) { return nil, Nil } - replyLen, err := strconv.Atoi(string(line[1:])) + replyLen, err := util.Atoi(line[1:]) if err != nil { return nil, err }