From 67fdd829fbc19d6097b3dd35eeef11ff27ab3a0f Mon Sep 17 00:00:00 2001 From: bryanqiu Date: Fri, 21 Jun 2024 17:50:17 +0800 Subject: [PATCH] fix: --- redis.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis.go b/redis.go index 800028f..b0ae6de 100644 --- a/redis.go +++ b/redis.go @@ -1,20 +1,20 @@ package redis import ( + redigo "github.com/gomodule/redigo/redis" "qoobing.com/gomod/redis/redis" "qoobing.com/gomod/redis/sentinel" ) type Config = sentinel.Config -var NewPool = redis.NewPool var NewRedisPool = redis.NewPool var NewSentinelPool = sentinel.NewPool -func NewPool(cfg Config) *redis.Pool { +func NewPool(cfg Config) *redigo.Pool { if cfg.Master != "" { return NewRedisPool(cfg) - } else if cfg.MasterName { + } else if cfg.MasterName != "" { return NewSentinelPool(cfg) } panic("invalid config: Master & MasterName are both empty")