flâneur — a map of the web's best reading

Go maps in action - The Go Programming Language

go.dev · 1,411 words · saved by 1 readers

How and when to use Go maps.

Go maps in action - The Go Programming Language The Go Blog Go maps in action Andrew Gerrand 6 February 2013 Introduction One of the most useful data structures in computer science is the hash table. Many hash table implementations exist with varying properties, but in general they offer fast lookups, adds, and deletes. Go provides a built-in map type that implements a hash table. Declaration and initialization A Go map type looks like this: map[KeyType]ValueType where KeyType may be any type that is comparable (more on this later), and ValueType may be any type at all, including another map!

Explore this link on the map →

related reading