Go maps
A map stores values indexed by keys, allowing efficient lookup, insertion, and deletion. A map must be initialized before writing to it, and looking up a key can return a second boolean indicating whether that key exists.
Minimal example
func main() {
counts := map[string]int{"user-42": 3}
count, ok := counts["user-42"]
fmt.Println(count, ok)
}