title: Benefits of using pointers in nested structs in golang
body: <p>I've been looking in many, many places and I couldn't find any satisfying answer for my question: <strong>what is the benefit of using pointers to nested structs in Go?</strong></p>
  
  <p>Currently I am total newbie in Go, I started reading a book "Go programming language" and I do every excerice there to make sure I understand the syntax and use case. Until now. The goal of one of tasks was to create very simple GitHub client that retrieves a list of issues filtered by given params. It's an example showing how to use <em>json unmarshalling</em>. So there are some nested structs:</p>
  
  
  
  <pre><code>type SearchIssueResult {
      TotalCount int
      Issues []*Issue
  }
  
  type Issue {
      Title string
      Author *User
      // ... other properties
  }
  </code></pre>
  
  <p>And here's my question again: <strong>Why these nested structs have type of pointers to structs?</strong> I can use just struct type and it works as well (with slight modifications in usage of struct's instance) but I would like to understand when to use different approaches.</p>
  
  <p>Thanks!</p>