title: Custom errors in golang and pointer receivers
body: <p>Reading about value receivers vs pointer receivers across the web and stackoverflow, I understand the basic rule to be: If you don't plan to modify the receiver, and the receiver is relatively small, there is no need for pointers.</p>
  
  <p>Then, reading about implementing the <code>error</code> interface (eg. <a href="https://blog.golang.org/error-handling-and-go" rel="noreferrer">https://blog.golang.org/error-handling-and-go</a>), I see that examples of the <code>Error()</code> function all use pointer receiver.</p>
  
  <p>Yet, we are not modifying the receiver, and the struct is very small.</p>
  
  <p>I feel like the code is much nicer without pointers (<code>return &amp;appError{}</code> vs <code>return appError{}</code>).</p>
  
  <p>Is there a reason why the examples are using pointers?</p>