title: Golang goroutine not running defer with function that uses range on channel
body: <p>A range on a channel</p>
  
  <pre><code>for s := range cs {
      fmt.Println("Recieved Cake: ", s)
  }
  </code></pre>
  
  <p>should keep a function open until the channel closes at which point the function/goroutine should terminate. When a function terminates the defer function should run just prior. This doesn't seem to be the case and I can't find any reasons why.</p>
  
  <p>Sample code at <a href="http://play.golang.org/p/ADu1MzAe9P" rel="nofollow">http://play.golang.org/p/ADu1MzAe9P</a> produces defer statements as expected except for the function that is recieving from the channel. Any reasons as to why this would be? thanks!</p>