October 2015
Beginner to intermediate
400 pages
14h 44m
English
In this section, we’ll offer some advice on how to follow Go’s distinctive conventions for naming packages and their members.
When creating a package, keep its name short, but not so short as to
be cryptic.
The most frequently used packages in the standard library are named
bufio, bytes, flag, fmt, http,
io, json, os, sort, sync, and
time.
Be descriptive and unambiguous where possible.
For example, don’t name a utility package util when a name such
as imageutil or ioutil is specific yet still concise.
Avoid choosing package names that are commonly used for related local
variables, or you may compel the package’s clients to use
renaming imports, as with the path package.
Package names usually take the singular ...