title: Is it possible to define equality for named types/structs?
body: <p>After reading a <a href="https://stackoverflow.com/questions/20297503/slice-as-a-key-in-map">related question</a> about using slices in maps, I became curious about equality in Go.</p>
  
  <p>I know it's possible to override the <code>equals</code> method of a Java <code>Object</code>. Is there a similar way to define how Go checks user defined types/structs for equality? If so, there would be a workaround for the issue referenced above. I thought using <a href="http://play.golang.org/p/8CzhmDnDLQ" rel="noreferrer"><code>interface{}</code> values</a> might offer a solution but I received the error message <code>panic: runtime error: hash of unhashable type []int</code>.</p>