title: How to stop a goroutine
body: <p>I have a goroutine that calls a method, and passes returned value on a channel:</p>
  
  <pre><code>ch := make(chan int, 100)
  go func(){
      for {
          ch &lt;- do_stuff()
      }
  }()
  </code></pre>
  
  <p>How do I stop such a goroutine?</p>