title: How to handle patch request with unset value in golang
body: <p>I am working on a patch restful request that the body json contain some omitted value while sending to golang. Since an unset value will lead the golang struct become default value. So I would like to know if there are any solution to deal with patch request omit data?</p>
  
  <p>As I know, a basic type like string / int cannot be nullable in golang. there are different approach to deal with unset value patch request. For example:</p>
  
  <ol>
  <li><p>using pointer to deal with null problem</p>
  
  <pre><code>type User struct {
      Name *string
  }
  </code></pre></li>
  <li><p>using nullable library</p>
  
  <pre><code>type User struct {
      Name  sql.NullString
  }
  </code></pre></li>
  <li><p>using <code>map[string][]interface{}</code> to see if the value is set</p></li>
  </ol>
  
  <p>Is there any better solution to deal with nullable value inside struct? since this 3 should be work around to deal with the nullable value. </p>