title: How to scan a QueryRow into a struct with pgx
body: <p>We are using a user struct with alot of fields as follow : </p>
  
  <pre><code>type user struct {
      ID       int    `json:"id,omitempty"`
      UUID     string `json:"uuid,omitempty"`
      Role     int    `json:"role,omitempty"`
      Name     string `json:"name,omitempty"`
      Surname  string `json:"surname,omitempty"`
      Phone    string `json:"phone,omitempty"`
      Email    string `json:"email,omitempty"`
      Street   string `json:"street,omitempty"`
      City     string `json:"city,omitempty"`
      Password string `json:"password,omitempty"`
  }
  </code></pre>
  
  <p>And a function to get a user by its email :</p>
  
  <pre><code>func getUserByEmail(email string) (u user, err error) {
      row := db.Psql.QueryRow(
          context.Background(),
          "SELECT * FROM users WHERE email=$1",
          email)
      err = row.Scan(&amp;u.ID, &amp;u.UUID, &amp;u.Role, &amp;u.Name, &amp;u.Surname, &amp;u.Phone, &amp;u.Email, &amp;u.Street, &amp;u.City, &amp;u.Password)
      if err != nil {
          log.Fatal(err)
      }
      return
  }
  </code></pre>
  
  <p>Is there a way to scan directly to a struct rather than all of its property ? Ideally :</p>
  
  <pre><code>row.Scan(&amp;u)
  </code></pre>