| 123456789101112131415161718192021222324 |
- package test
- import (
- "fmt"
- "github.com/zeromicro/go-zero/core/stores/redis"
- "testing"
- )
- func TestName(t *testing.T) {
- newRedis, err := redis.NewRedis(redis.RedisConf{
- Host: "10.8.230.17:6379",
- Type: "node",
- Pass: "",
- Tls: false,
- NonBlock: false,
- })
- if err != nil {
- fmt.Println(err)
- } else {
- fmt.Println(newRedis.Ping())
- }
- }
|