|
|
@@ -36,7 +36,7 @@ type Config struct { |
|
|
|
var pool *redigo.Pool |
|
|
|
var conf *Config |
|
|
|
|
|
|
|
func NewRedis(addr, password string) { |
|
|
|
func NewRedis(addr string) { |
|
|
|
if addr == "" { |
|
|
|
panic("\nredis connect string cannot be empty\n") |
|
|
|
} |
|
|
@@ -48,7 +48,6 @@ func NewRedis(addr, password string) { |
|
|
|
Wait: true, |
|
|
|
Dial: func() (redigo.Conn, error) { |
|
|
|
c, err := redigo.Dial("tcp", addr, |
|
|
|
redigo.DialPassword(password), |
|
|
|
redigo.DialConnectTimeout(redisDialTTL), |
|
|
|
redigo.DialReadTimeout(redisReadTTL), |
|
|
|
redigo.DialWriteTimeout(redisWriteTTL), |
|
|
|