title: Compare error message in golang
body: <p>Let's say I create a new error in golang like so</p>
  
  <pre><code>err := errors.New("SOME_COMMON_ERROR_CODE")
  </code></pre>
  
  <p>In java, I'm used to being able to get Exception with <code>GetMessage()</code> messages. How would I compare that error if returned?</p>
  
  <pre><code>if some_err := some_package.DoSomething(); some_err != nil {
      if some_err.GetMessage() == "SOME_COMMON_ERROR_CODE" {
          // handle it however.
      }
  }
  </code></pre>
  
  <p>How is this done in golang?</p>