Chapter 6. Go Packages and Programs
Chapter 5, Functions in Go covered functions, the elementary level of abstraction for code organization that makes code addressable and reusable. This chapter continues up the ladder of abstraction with a discussion centered around Go packages. As will be covered in detail here, a package is a logical grouping of language elements stored in source code files that can be shared and reused, as covered in the following topics:
The Go package
Creating packages
Building packages
Package visibility
Importing packages
Package initialization
Creating programs
Remote packages