title: How to make a nullable field in a struct
body: <p>I'm struggling to do table driven test, and I want do this:</p>
  
  <pre><code>testCases := []struct {
      name          string
      testUserID    uint
      expected      User // &lt;- maybe nil
      expectedError error
  }
  </code></pre>
  
  <p>Because the return values of tested function is <code>*User, error</code>.</p>
  
  <p>User is like this, it is defined as DB scheme.</p>
  
  <pre><code>type User struct {
    ID uint
    CreatedAt time.Time
    UpdatedAt time.Time
    ...
  }
  </code></pre>
  
  <p>But in this case, I cannot make <code>expected</code> nil.</p>
  
  <p>How can I do this?</p>
  
  <p>Or my approach to do table driven test is wrong?</p>