func (master *Master) Go(cookie string, userServiceMethod string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call { serviceMethod := "User." + userServiceMethod if slave, err := master.getStartedSlave(cookie); err != nil { call := new(rpc.Call) call.ServiceMethod = serviceMethod call.Args = args call.Reply = reply if done == nil { done = make(chan *rpc.Call, 10) // buffered. } else { // If caller passes done != nil, it must arrange that // done has enough buffer for the number of simultaneous // RPCs that will be using that channel. If the channel // is totally unbuffered, it's best not to run at all. if cap(done) == 0 { log.Panic("rpc: done channel is unbuffered") } } call.Done = done call.Error = err call.Done <- call return call } else { return slave.conn.Go(serviceMethod, args, reply, done) } }