This commit is contained in:
2024-08-06 09:39:23 +08:00
parent 9de661a237
commit 74f18cdf83
4 changed files with 19 additions and 18 deletions
+18
View File
@@ -0,0 +1,18 @@
package lib
import (
"fmt"
"github.com/redis/go-redis/v9"
)
func Lib() {
fmt.Println("lib")
rdb := redis.NewClient(&redis.Options{
Addr: "localhost:6379",
Password: "", // 没有密码,默认值
DB: 0, // 默认DB 0
})
defer rdb.Close()
}