build(deps):更新Redis驱动版本。

This commit is contained in:
徐涛
2022-08-11 16:42:31 +08:00
parent 25a70aff86
commit 51386ccba1
3 changed files with 15 additions and 10 deletions

View File

@@ -5,12 +5,12 @@ import (
"electricity_bill_calc/config"
"fmt"
"github.com/go-redis/redis"
"github.com/go-redis/redis/v8"
)
var (
RedisConn *redis.Client
Ctx = context.Background()
Ctx = context.Background()
)
func SetupRedisConnection() error {
@@ -20,7 +20,7 @@ func SetupRedisConnection() error {
DB: config.RedisSettings.DB,
})
_, err := RedisConn.Ping().Result()
_, err := RedisConn.Ping(Ctx).Result()
if err != nil {
return err
}