Go handles packages and dependencies through its built-in toolchain. The go executable provides compilation alongside lightweight package management; go mod supplies module-based dependency support. Keeping these tasks in one toolchain makes dependency handling part of ordinary application development. section 1.1 section 1.2.4
An import names a package from the standard library, a local module, or an external path. Code refers to imported functionality through the package name, as in fmt.Println. Imports can be grouped; by convention, standard-library packages precede external packages. Package handling is designed with compilation in mind, supporting fast builds while making trade-offs for that speed. section 1.2.4 section 1.2.4
import (
"fmt"
"net/http"
"golang.org/x/net/html" #1
)
Compare the standard-library imports fmt and net/http with the external path golang.org/x/net/html in one import group. section 1.2.4
Dependency command
The illustrated command is `go get ./...`. It appears alongside imports as a toolchain operation for working with packages. section 1.2.4




