Finding Unique Items in a Go Slice or Array
问题 I'm pretty new to go and I'm really, really confused right now. Let's say I have a list of coordinates and lets say I have some doubles in this list of coordinates. I can't for the life of me figure out how to make a unique list. Normally in Python I can "cheat" with sets and other built-ins. Not so much in Go. package main import ( "fmt" "reflect" ) type visit struct { x, y int } func main() { var visited []visit var unique []visit visited = append(visited, visit{1, 100}) visited = append