title: When main exits, do goroutines run defer()?
body: <p>If I have a goroutine, can I close a channel I have open on that goroutine using something like this?</p>
  
  <p><code>defer(close())</code></p>
  
  <p>Or are defer statements not run for goroutines when main exits?</p>