1

In golang for receiving on multiple channels I should use following construction:

for {
    select {
    case chan1:
    case chan2:
    }
}

Whant if I don't know the exact number of channel I will receive on?

Is it possible somehow to listen from some object which contains arbitrary (runtime defined) number of channels?

Kenenbek Arzymatov
  • 8,439
  • 19
  • 58
  • 109

0 Answers0