diff --git a/redis.go b/redis.go index c7d03b2..99de8d3 100644 --- a/redis.go +++ b/redis.go @@ -14,12 +14,14 @@ var redisCtx = context.Background() var redisPrefix = "ship." -func RedisConnect(addr string, password string, db int) { +func RedisConnect(addr string, password string, db int) error { rdb = redis.NewClient(&redis.Options{ Addr: addr, Password: password, DB: db, }) + + return rdb.Ping(redisCtx).Err() } func RedisKey(components ...string) (string) {