structSet := map[int]struct{}{}
var exists = struct{}{}
ints := []int{1, 1, 2, 2, 3}
for _, v := range ints {
structSet[v] = exists
}
for i, v := range structSet {
fmt.Println(i, v)
}
if _, ok := structSet[4]; ok {
fmt.Println("number is in the set")
} else {
fmt.Println("not in the set")
}