I'm trying to load db data to redis cluster using mysql2redis.
When i try the accepted solution, i.e.,
} 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:")
}
I get following exception,
too many arguments in call to client.Do
have (string, string, []string...)
want (string, ...interface {})
I'm a newbie when it comes to Go. So can the Go veterans take a look at this and suggest a solution?