go command

The single command-line program that ships with Go and builds, runs, tests, formats and documents your code through subcommands.

In more detail

Everything in the Go toolchain is reached as go followed by a verb, such as go build, go test, go vet, go mod or go doc. Every subcommand documents itself: go help build prints its usage line and options. Because the checks ship with the toolchain, a new machine needs nothing else installed.

Example

go help build | sed -n '1,3p'

Related terms

Taught in

References