first commit

This commit is contained in:
2025-11-24 11:18:08 +08:00
commit b9eb4abed0
15 changed files with 390 additions and 0 deletions

23
calculate/cal.go Normal file
View File

@@ -0,0 +1,23 @@
package calculate
import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
)
var ctx = context.Background()
func Calculate() {
client := redis.NewClient(&redis.Options{
Addr: "mayimingperson.com:7000",
Password: "",
DB: 0,
})
Pong, eror := client.Ping(ctx).Result()
if eror != nil {
fmt.Println("redis连接失败")
}
fmt.Println(Pong)
}