the redis, that is working on go today uses redigo
redigo. The execution actions are all carried out through Do
//Do
func (c *conn) Do(cmd string, args ...interface{}) (interface{}, error)
he uses variable parameters. I personally want to make improvements based on him. I use hash to distribute key to different nodes and do sub-libraries on the business side, and then I write a new func:
.func CallDo(cmd string, args ...interface{}) (interface{}, error){
//TODO:redis
return rc.Do(cmd, args)
}
now the problem with Do and CallDo is that I also used variable parameters in CallDo , and the number of parameters changed when I passed Do . Do you have a solution to this, or is there a callback like call_user_func in go
