Chapter 13.
Optional Go features
In this section of the book we’re going to talk about two Go features that are relatively new additions to the language: file embedding and generics.
Using these features is completely optional — our application works absolutely fine without them — but they are both useful and worth knowing about.
Essentially:
File embedding makes it possible to embed external files into your Go program itself.
Generics can help to reduce the amount of boilerplate code you need to write, while retaining compile-time type safety.
Let’s jump straight in and take a look at them.