0
我试图使用mysql2redis将db数据加载到redis集群。调用中的参数太多
当我尝试接受的解决方案,即
} else if e.Command == "HMSET" {
// Build up a string slice to hold the key value pairs
args := make([]string, 0, len(e.MapData) * 2)
for k, v := range e.MapData {
args = append(args, k, v)
}
_,err := redis.StringMap(client.Do("HMSET", e.Key, args...))
checkErr(err, "hmset error:")
}
我得到异常以下,
too many arguments in call to client.Do
have (string, string, []string...)
want (string, ...interface {})
我是一个新手,当来得快去得也快。那么Go老兵们可以看看这个并提出解决方案吗?