title: how to select for input on a dynamic list of channels in Go?
body: <p>Go has a mechanism to do a blocking read from one of several channels, the <a href="http://golang.org/doc/go_spec.html#Select_statements" rel="noreferrer">select</a> statement.  So you can say</p>
  
  <pre><code>select {
      case &lt;- c1:
      case &lt;- c2:
  }
  </code></pre>
  
  <p>will block until we get input from either of these two channels.  Very nice. </p>
  
  <p>But this requires that I specify in the source code how many channels I want to poll.  What if I have a slice or array of channels and I want to block until I get input on any of them?</p>