Part 1 Background and fundamentals

 

This initial section of the book presents some background about Go and its built-in tooling and provides a foundation for building applications. In this section, we hope to build a foundation that will be useful for developing any project, including those later in the book.

In chapter 1, we start with an overview of Go and its landscape for those who are not familiar with it. Chapters 2 and 3 move to base components for a command-line application. Chapter 2 provides the foundation for building an application, including working with console applications and servers and handling configuration. Chapter 3 looks at core data structures and method calling by using structs and interfaces. As part of this discussion, we look at generic types and generic programming. Go resisted adding generic support for more than a decade, but its introduction allows you to streamline your code by generalizing some functions and methods without the need for overzealous runtime reflection.