123456789101112131415161718 |
- package cache
- import (
- "fmt"
- "testing"
- )
- func init() {
- Setup([]string{"127.0.0.1:6379"}, "", 0, 100, 10, 1, false)
- }
- func TestSAdd(t *testing.T) {
- res, err := Redis().SAdd("skey1", "0", "1", "2")
- fmt.Println("redis sadd: ", res, err)
- b, err := Redis().SetNx("key1", 100900)
- fmt.Println("redis setnx: ", b, err)
- }
|