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: "120.92.140.224:16379", Type: "node", Pass: "123456", Tls: false, NonBlock: false, }) if err != nil { fmt.Println(err) } else { fmt.Println(newRedis.Ping()) } } func Test2(t *testing.T) { var a = '好' fmt.Printf("character %c,unicode %U binary %016b\n", a, a, a) var b = "好" for _, i := range []byte(b) { fmt.Printf("binary %b\n", i) } for _, i := range b { fmt.Printf("binary %b\n", i) } }