Everything in Go is delivered in the form of packages. A Go package is a Go source file that begins with the package keyword followed by the name of the package. Some packages have a structure. For example, the net package has several subdirectories, named http, mail, rpc, smtp, textproto, and url, which should be imported as net/http, net/mail, net/rpc, net/smtp, net/textproto, and net/url, respectively.
Apart from the packages of the Go standard library, there exist external packages that can be imported using their full address and that should be downloaded before their first use. One such example is github.com/matryer/is, which is stored in GitHub.
Packages are mainly used for grouping related functions, variables, and constants so that you can transfer them easily and use them in your own Go programs. Note that apart from the main package, Go packages are...