hashsets in go

from blog blog, | ↗ original
Hashsets in go tl;dr var hashSet map[string]struct{} Introduction The term HashSet is a data structure from the Java universe describing a value-less HashMap1. It is perfect when uniqueness is needed but avoids the overhead of a value. Using golang they can be constructed using an ordinary map and an empty struct: var hashSet map[key]struct{} Use...