0
我想用key =「user_queue」和members = [「v1」,「v2」,...「v50」]調用類似「ZRem(key string,members ... string)」的方法。如何調用像「ZRem(key string,members ... string)」這樣的golang func?
我已經試過類似
func ZRem(key string, members ...string){
// do something
}
func main(){
// do something
// task_ids is a []string
ZRem("user_queue", task_ids[0], task_ids[1:]...)
}
但收到編譯錯誤。
too many arguments in call to ZRem