In this chapter, we discussed generating Go code. We talked about how to do so for one of the most commonly generated pieces of go code, gRPC protobufs. Then, we talked about the using link toolchain to add command-line arguments and spf13/cobra and spf13/viper to create metaprogrammed CLI tooling. Lastly, we talked about templated programming using the text/template, HTML/template, and Sprig libraries. Using all of these packages will help us make readable, reusable, performant Go code. These templates will also save us a lot of work in the long run as they tend to be reusable and scalable.
In the next chapter, we'll discuss how to optimize for memory resource management.