title: QueryRow().Scan() returns an error if row wasn't found. How to solve?
body: <p>I have spent a lot of time trying to solve this problem.</p>
  
  <p>I have a struct:</p>
  
  <pre><code>type Token struct {
      Id             *int64     `db:"id"`
      Email          *string    `db:"email"`
      OperationType  *string    `db:"operation_type"`
      Token          *string    `db:"token"`
      ExpirationDate *time.Time `db:"expiration_date"`
  }
  </code></pre>
  
  <p>I have a function which finds one token by email:</p>
  
  <pre><code>func (r Repo2) FindOneByEmail(ctx context.Context, email string, ct *Token) error {
      row := r.DB.QueryRow(`
          SELECT id, email, operation_type, token, expiration_date 
          FROM tokens 
          WHERE email=$1 AND type=$2 AND expiration_date&gt;$3::date`,
          email, "registration", time.Now(),
      )
  
      err := row.Scan(&amp;ct.Id, &amp;ct.Email, &amp;ct.OperationType, &amp;ct.Token, &amp;ct.ExpirationDate)
      if err != nil {
          return err
      }
  
      return nil
  }
  </code></pre>
  
  <p>Some fields in db can be null (that is why I use pointers in struct)</p>
  
  <p>But when I do .Scan, it throws error (as value is null it can't take address "&amp;")</p>
  
  <p>But if I remove "&amp;", It throws error too "invalid memory address or nil pointer dereference"</p>
  
  <p><strong>So how can I solve this problem?</strong></p>
  
  <p>The idea is: If if finds a row, it needs to get fields values, but if row was not found it needs to throw sql.ErrNoRows </p>