title: Difference using pointer in struct fields
body: <p>We can create structs in golang this way. Examples below:
  What are differences between these two?</p>
  
  <pre><code>// Usual way
  type Employee struct {
      firstName string    `json:"name"`
      salary    int       `json:"salary"`
      fullTime  bool      `json:"fullTime"`
      projects  []Project `json:"projects"`
  }
  
  // Un-usal way with pointers
  type Employee struct {
      firstName *string    `json:"name"`
      salary    *int       `json:"salary"`
      fullTime  *bool      `json:"fullTime"`
      projects  *[]Project `json:"projects"`
  }
  </code></pre>
  
  <p>Are there any trade-offs like memory? </p>
  
  <p><strong>Update:</strong></p>
  
  <p>Assume below function:</p>
  
  <pre><code>// this function consumes MORE memory
  func printEmployeeWithoutPointer(employee Employee) {
      // print here
  }
  
  // this function consumes LESS memory
  func printEmployeeWithPointer(employee *Employee) {
      // print here
  }
  </code></pre>