添加对应的说明文档

This commit is contained in:
2024-08-05 10:45:03 +08:00
parent cd9f8ce083
commit 5c0cf17300
11 changed files with 71 additions and 53 deletions
+3 -1
View File
@@ -7,5 +7,7 @@ go_library(
],
importpath = "hello/lib",
visibility = ["//visibility:public"],
deps = [
"@com_github_redis_go_redis_v9//:go-redis",
],
)
+12 -1
View File
@@ -1,7 +1,18 @@
package lib
import "fmt"
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()
}