Custom Packages and Visibility
Explore how to organize Go code with custom packages and apply visibility rules. Understand GOPATH workspace structure, use the go command to build and install packages, and learn about package initialization using init functions.
Packages are the primary means in Go for organizing and compiling code. A lot of basic information about packages has already been given in Chapter 2, most notably the Visibility rule. Now we will see concrete examples of the use of packages that you write yourself. By custom packages, we mean self-written packages or packages otherwise external to the standard library.
When writing your packages, use short, single-word, lowercase names without _ for the filename(s).
...