title: Why do I need to do an additional for loop over the results of my go routine/channel to display all results?
body: <p>A quick explanation of the code:</p>
  
  <ul>
  <li>I'm ranging over <code>db.Feeds()</code> which is a list of RSS feed urls.</li>
  <li>I'm getting the feeds in the <code>getFeeds()</code> function via a goroutine</li>
  <li>The output of <code>getFeeds()</code> is returned into the rss channel</li>
  <li><p>I then print the RSS information</p>
  
  <pre><code>func main() {
      rss := make(chan feed)
  
      for _, url := range db.Feeds() {
          go getFeeds(url, rss)
      }
  
      for range db.Feeds() {
          newFeed := &lt;-rss
          fmt.Println(newFeed.Channel.Title, newFeed.Channel.Description)
      }
  }
  </code></pre></li>
  </ul>
  
  <p>My question is as follows: When I directly print the newFeed variable it doesn't display all results from the rss channel, only the first one.</p>
  
  <p>I seem to have to range over <code>db.Feeds()</code> (the list of RSS feed urls) and print the channel results from the for loop containing the go <code>getFeeds()</code> for it to display all the results.</p>
  
  <p>Why is this the case? I would have though for each loop of the range, it would return into the rss channel and print the results without having to range over <code>db.Feeds()</code> a second time?</p>
  
  <p>Any clarification greatly helped, I'm new to Go! Loving it, but not got my head around some aspects of the language yet.</p>