title: Get pointer to a struct field value
body: <p>I'm trying to make a function that converts a struct in the way mysql rows.Scan function needs it, so I don't need to pass manually lots of parameters.  </p>
  
  <p>Note: I know the existence of sqlx and the alternative of writing manually in separate lines every pointer, but I'd like to solve it in this way as I'm learning go and want to understand what's going on.</p>
  
  <p>The error I get with this solution is:<br>
  <code>panic: sql: Scan error on column index 0: destination not a pointer
  </code>
  to me looks like <code>valueField.Addr().Pointer()</code> should be a Pointer to the value. The following is a simplification of my code.</p>
  
  <pre><code>type User struct {
      Name string
      Age  int
  }
  
  func StrutForScan(u interface{}) []interface{} {
      val := reflect.ValueOf(u).Elem()
      v := make([]interface{}, val.NumField())
      for i := 0; i &lt; val.NumField(); i++ {
          valueField := val.Field(i)
          v[i] = valueField.Addr().Pointer()
      }
      return v
  }
  
  func ListUsers {
      rows, err := db.Query("SELECT * FROM users")
      PanicIf(err)
      var user User
      for rows.Next() {
          err := rows.Scan(StrutForScan(&amp;user)...)
          PanicIf(err)
          fmt.Printf("\nName: %s, Age: %s", user.Name, string(user.Age))
  
      }
  }
  </code></pre>