If I create an array of reflect.SelectCase
for i := range workers {
cases[i] = reflect.SelectCase{Dir: reflect.SelectRecv, Chan: reflect.ValueOf(channels[i])}
}
Inside function like this:
func (cases []reflect.SelectCase){
for i := range workers {
cases[i].getChan <- struct{}{} // ??
}
}
How can I get chan
to send value?
Aucun commentaire:
Enregistrer un commentaire