November 2017
Intermediate to advanced
670 pages
17h 35m
English
Let's consider another common collection operation: contains.
In Go, lists of things are often stored in a slice. Wouldn't it be nice if Go provided a contains method to tell us whether the item we are looking for is contained in the slice? Since there is no generic contains method for working with lists of items in Go, let's implement one to iterate over a collection of car objects.