title: Go map with user-defined key with user-defined equality?
body: <p>Suppose I have a struct type in Go that I want to use as a key in a map, but I <em>don't</em> want to use Go's builtin equality operation.  What's the best way to build such a map?</p>
  
  <p>For a concrete example, here is my key type and equality operation:</p>
  
  <pre><code>type Key struct {
      a *int
  }
  
  func Equal(x Key, y Key) bool {
      return *x.a == *y.a
  }
  </code></pre>
  
  <p>How can I build a map that uses <code>Equal</code> for key comparison?</p>