internal/proto: util util.Atoi

This commit is contained in:
Vladimir Mihailenco 2019-08-14 10:24:13 +03:00
parent d22f03ecbc
commit 61e0d1d527
1 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,6 @@ import (
"bufio" "bufio"
"fmt" "fmt"
"io" "io"
"strconv"
"github.com/go-redis/redis/v7/internal/util" "github.com/go-redis/redis/v7/internal/util"
) )
@ -134,7 +133,7 @@ func (r *Reader) readStringReply(line []byte) (string, error) {
return "", Nil return "", Nil
} }
replyLen, err := strconv.Atoi(string(line[1:])) replyLen, err := util.Atoi(line[1:])
if err != nil { if err != nil {
return "", err return "", err
} }
@ -259,7 +258,7 @@ func (r *Reader) _readTmpBytesReply(line []byte) ([]byte, error) {
return nil, Nil return nil, Nil
} }
replyLen, err := strconv.Atoi(string(line[1:])) replyLen, err := util.Atoi(line[1:])
if err != nil { if err != nil {
return nil, err return nil, err
} }