mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 08:32:40 +08:00
更新redis
This commit is contained in:
@ -132,3 +132,4 @@ func TestPubSub(t *testing.T) {
|
||||
t.Logf("total received %d message", total)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -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":
|
||||
// 间隔KEY,KEY位置规则1,3,5,7
|
||||
r.rename(args, createSepuence(1, len(args), 2)...)
|
||||
|
9
redis/rename_hook_test.go
Normal file
9
redis/rename_hook_test.go
Normal file
@ -0,0 +1,9 @@
|
||||
package redis
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestRename(t *testing.T) {
|
||||
New(&ReidsOption{
|
||||
Addrs: []string{"192.168.123.100:6379"},
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user