redis操作
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
552 B

package redis
import (
"testing"
)
func Test_Zset(t *testing.T) {
Conn()
ret3, err := ZAdd("zset", 9, 9)
t.Log(ret3)
t.Log(err)
ret3, err = ZCard("zset")
t.Log(ret3)
t.Log(err)
// ret3, err = ZRem("zset", 9)
// t.Log(ret3)
// t.Log(err)
ret3, err = ZCount("zset", 0, 100)
t.Log(ret3)
t.Log(err)
ret3, err = ZIncrBy("zset", 10, 9)
t.Log(ret3)
t.Log(err)
ret3, err = ZRank("zset", 9)
t.Log(ret3)
t.Log(err)
ret3, err = ZRevrank("zset", 9)
t.Log(ret3)
t.Log(err)
ret4, err := ZScore("zset", 9)
t.Log(ret4)
t.Log(err)
}