Skip to content

Commit 374ab8e

Browse files
committed
refactor: export IsRedisNil by func
1 parent 951d69c commit 374ab8e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rueidis.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ const (
1414
DefaultPoolSize = 1000
1515
)
1616

17-
var (
18-
IsRedisNil = proto.IsRedisNil
19-
ErrConnClosing = errors.New("connection is closing")
20-
)
17+
var ErrConnClosing = errors.New("connection is closing")
2118

2219
type ConnOption struct {
2320
// CacheSizeEachConn is redis client side cache size that bind to each TCP connection to a single redis instance.
@@ -50,6 +47,10 @@ func NewSingleClient(option SingleClientOption) (*SingleClient, error) {
5047
return newSingleClient(option, makeConn)
5148
}
5249

50+
func IsRedisNil(err error) bool {
51+
return proto.IsRedisNil(err)
52+
}
53+
5354
func makeConn(dst string, opt ConnOption) conn {
5455
return makeMux(dst, opt, dial)
5556
}

0 commit comments

Comments
 (0)