I have defined my own type in Go:
type Sha1Hash [20]byte
I would like to sort two of these hashes, h1 and h2:
func Compare(h1, h2 Sha1Hash) int {
h1 >= h2 // doens't work, arrays only have == and !=
bytes.Compare(h1,h2) //doesn't work, Compare only works on slices
}
How can I compare my arrays?