1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

Fix proto.RedisError in slices

This commit is contained in:
Vladimir Mihailenco
2018-02-22 14:14:30 +02:00
parent 71ed499c46
commit 56dea1f39a
14 changed files with 122 additions and 105 deletions

View File

@ -4,14 +4,10 @@ import (
"io"
"net"
"strings"
"github.com/go-redis/redis/internal/proto"
)
const Nil = RedisError("redis: nil")
type RedisError string
func (e RedisError) Error() string { return string(e) }
func IsRetryableError(err error, retryNetError bool) bool {
if IsNetworkError(err) {
return retryNetError
@ -30,7 +26,7 @@ func IsRetryableError(err error, retryNetError bool) bool {
}
func IsRedisError(err error) bool {
_, ok := err.(RedisError)
_, ok := err.(proto.RedisError)
return ok
}