diff --git a/priority/priority.go b/priority/priority.go index 5dc37be..ccdfe32 100644 --- a/priority/priority.go +++ b/priority/priority.go @@ -34,7 +34,7 @@ type Priority struct { func InitPriority(ctx context.Context, re redis.UniversalClient, keyPrefix string, priority int64, opts ...Option) (*Priority, error) { - if re != nil { + if re == nil { return nil, errors.New("redis is nil") }