Introduction
The Go team at Google is always thinking about how to make the lives of Go developers easier and what tools, packages, and support we need for the future – always in a fully backward-compatible way. In this chapter, we will expand upon our knowledge gained so far and discuss Go generics.
Generics officially became a part of the language in Go version 1.18. Go generics provide a powerful means of developing code that removes duplication, simplifies readability, and enables developers a way to use multiple types within a function. However, with great power comes great responsibility. Let’s discuss generics further.