1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00

更新redis

This commit is contained in:
2023-10-13 10:52:36 +08:00
parent e83db7daee
commit d1c269ed90
8 changed files with 48 additions and 42 deletions

View File

@ -132,3 +132,4 @@ func TestPubSub(t *testing.T) {
t.Logf("total received %d message", total)
})
}

View File

@ -60,6 +60,9 @@ func (r renameKey) renameKey(cmd redis.Cmder) {
case "RENAME", "RENAMENX", "MGET", "BLPOP", "BRPOP", "RPOPLPUSH", "SDIFFSTORE", "SINTER", "SINTERSTORE", "SUNIONSTORE":
// 连续KEY
r.rename(args, createSepuence(1, len(args), 1)...)
case "sssss":
// 除最后一个外连续键
r.rename(args, createSepuence(1, len(args)-1, 1)...)
case "MSET", "MSETNX":
// 间隔KEYKEY位置规则1,3,5,7
r.rename(args, createSepuence(1, len(args), 2)...)

View File

@ -0,0 +1,9 @@
package redis
import "testing"
func TestRename(t *testing.T) {
New(&ReidsOption{
Addrs: []string{"192.168.123.100:6379"},
})
}