title: Golang struct array values not appending In loop
body: <p>This is my code:</p>
  
  <pre><code>package main
  
  import(
      "fmt"
  )
  
  type Category struct {
      Id   int
      Name string
  }
  
  type Book struct {
      Id         int
      Name       string
      Categories []Category
  }
  
  func main() {
      var book Book
  
      book.Id = 1
      book.Name = "Vanaraj"
  
      for i := 0; i &lt; 10; i++ {
          book.Categories = []Category{
              {
                  Id : 10,
                  Name : "Vanaraj",
              },
          }
      }
  
      fmt.Println(book)
  }
  </code></pre>
  
  <p>I need to append the values to the categories. The values are appending only one time. But I need to append the values to the array.</p>
  
  <p>How to fix this?</p>