renzheng 3 жил өмнө
parent
commit
25d6a12cef
4 өөрчлөгдсөн 12 нэмэгдсэн , 2 устгасан
  1. 1 1
      go.mod
  2. 1 1
      redis/redis.go
  3. 9 0
      redis/redis_test.go
  4. 1 0
      redis_v2.go

+ 1 - 1
go.mod

@@ -1,4 +1,4 @@
-module bp.365521.xyz/BP/redis-v2
+module bp.365521.xyz/BP/redis_v2
 
 go 1.16
 

+ 1 - 1
redis/redis.go

@@ -11,7 +11,7 @@ var ctx = context.Background()
 
 func Init() {
 	rdb := redis.NewClient(&redis.Options{
-		Addr:     "localhost:6379",
+		Addr:     "152.70.157.245:13301",
 		Password: "",
 		DB:       0,
 	})

+ 9 - 0
redis/redis_test.go

@@ -0,0 +1,9 @@
+package redis
+
+import (
+	"testing"
+)
+
+func TestInit(t *testing.T) {
+	Init()
+}

+ 1 - 0
redis_v2.go

@@ -0,0 +1 @@
+package redis_v2