title: How to decode Reddit's RSS using Golang?
body: <p>I've been playing about with Go's XML package and cannot see what is wrong with the following code. </p>
  
  <pre><code>package main
  
  import (
      "encoding/xml"
      "fmt"
      "net/http"
  ) 
  
  type Channel struct {
      Items Item
  }
  
  type Item struct {
      Title       string `xml:"title"`
      Link        string `xml:"link"`
      Description string `xml:"description"`
  }
  
  func main() {
  
      var items = new(Channel)
      res, err := http.Get("http://www.reddit.com/r/google.xml")
  
      if err != nil {
          fmt.Printf("Error: %v\n", err)
      } else {
          decoded := xml.NewDecoder(res.Body)
  
          err = decoded.Decode(items)
  
          if err != nil {
              fmt.Printf("Error: %v\n", err)
          }
  
          fmt.Printf("Title: %s\n", items.Items.Title)
      }
  }
  </code></pre>
  
  <p>The above code runs without any errors and prints to the terminal: </p>
  
  <pre><code>Title:
  </code></pre>
  
  <p>The struct seems empty but I can't see why it isn't getting populated with the XML data. </p>