title: Declare array of struct literal
body: <p>How do I declare an array of struct literal? </p>
  
  <p>Go:</p>
  
  <pre><code>type Ping struct {
      Content []aContent
  }
  
  type aContent struct {
      Type        string
      Id          string
      Created_at  int64
  }
  
  func main() {
      f := Ping{Content: []aContent{Type: "Hello", Id: "asdf"}}
      fmt.Println(f)
  }
  </code></pre>
  
  <p>The code can be found here: <a href="http://play.golang.org/p/-SyRw6dDUm" rel="noreferrer">http://play.golang.org/p/-SyRw6dDUm</a></p>