Understanding Maps
Understand maps in Go, including how to declare and access their values.
We'll cover the following...
Introduction
Maps are a collection of key-value pairs that a user can use to store some data and retrieve it with a key. In some languages, these are called dictionaries (Python) or hashes (Perl). In contrast to an array/slice, finding an entry in a map requires a single lookup versus iterating over the entire slice comparing values. With a large set of items, this can give us significant time savings.
Declaring a map
There are several ways to declare a map. Let's ...