feat: add MustNewRedis (#2824)
* feat: add MustNewRedis * feat: add MustNewRedis * feat: add MustNewRedis * x * x * fix ut * x * x * x * x * x
This commit is contained in:
@@ -9,6 +9,8 @@ var (
|
||||
ErrEmptyType = errors.New("empty redis type")
|
||||
// ErrEmptyKey is an error that indicates no redis key is set.
|
||||
ErrEmptyKey = errors.New("empty redis key")
|
||||
// ErrPing is an error that indicates ping failed.
|
||||
ErrPing = errors.New("ping redis failed")
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -27,7 +29,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
// NewRedis returns a Redis.
|
||||
// Deprecated: use MustNewRedis or NewRedis instead.
|
||||
func (rc RedisConf) NewRedis() *Redis {
|
||||
var opts []Option
|
||||
if rc.Type == ClusterType {
|
||||
|
||||
Reference in New Issue
Block a user