redis.Nil -> nil
This commit is contained in:
4
redis.go
4
redis.go
@ -97,6 +97,10 @@ func NewRedisonHandler(ctx context.Context, redisClient *redis.Client) *RedisonH
|
|||||||
|
|
||||||
func respToArray[T any](resp any, err error) ([]T, error) {
|
func respToArray[T any](resp any, err error) ([]T, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == redis.Nil {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user