This commit is contained in:
cdle
2023-06-14 17:51:15 +08:00
parent fd21bdc3b6
commit 9314209c08
2 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ func Try(RedisAddr, RedisPassword string) error {
DB: 0, // use default DB
DialTimeout: time.Second * 5,
})
err := db.Get(context.Background(), "666").Err()
err := db.HSet(context.Background(), "sillyGirl", "storage", "redis").Err()
if err == nil {
db.Close()
}
@@ -92,7 +92,7 @@ func Initsillyplus(RedisAddr, RedisPassword string) storage.Bucket {
DialTimeout: time.Second * 5,
})
err := db.Get(context.Background(), "666").Err()
err := db.HSet(context.Background(), "sillyGirl", "storage", "redis").Err()
if err != nil {
logs.Error("redis错误", err)
panic(err)