In this section, I will explain the use of the container standard Go package. The container package supports three data structures: a heap, list, and ring. These data structures are implemented in container/heap, container/list, and container/ring, respectively.
If you are unfamiliar with rings, a ring is a circular list, which means that the last element of a ring points to its first element. In essence, this means that all of the nodes of a ring are equivalent and that a ring does not have a beginning and an end. As a result, each element of a ring can help you to traverse the entire ring.
The next three subsections will illustrate each one of the packages contained in the container package. The rational advice is that if the functionality of the container standard Go package suits your needs, use it; otherwise, you should implement and use your own data...