修改判断的条件
This commit is contained in:
@@ -34,7 +34,7 @@ type Priority struct {
|
|||||||
|
|
||||||
func InitPriority(ctx context.Context, re redis.UniversalClient, keyPrefix string, priority int64, opts ...Option) (*Priority, error) {
|
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")
|
return nil, errors.New("redis is nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user