forked from free-lancers/electricity_bill_calc_service
build(deps):更新Redis驱动版本。
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user