I have started to use Golang and know that custom structs can be used as keys in maps. But I wanted to know if it is possible to explicitly specify how my map can differenciate between the keys (similar to Java where we use hashcode() and equals()). Lets say we have:
type Key struct {
Path, Country string
}
If I want to specify that only the Path attribute of struct Key be used to differentiate between keys in a map, how do I do that?