Scroll to navigation

GO(1) General Commands Manual GO(1)


go - tool for managing Go source code


go command [arguments]


The Go distribution includes a command, named go, that automates the downloading, building, installation, and testing of Go packages and commands.


Each command is documented in its own manpage. For example, the build command is documented in go-build(1). The commands are:

start a bug report
compile packages and dependencies
remove object files and cached files
show documentation for package or symbol
print Go environment information
update packages to use new APIs
gofmt (reformat) package sources
generate Go files by processing source
add dependencies to current module and install them
compile and install packages and dependencies
list packages or modules
module maintenance
workspace maintenance
compile and run Go program
test packages
run specified go tool
print Go version
report likely mistakes in packages

Use "go help <command>" for more information about a command.


build constraints
build modes
calling between Go and C
build and test caching
environment variables
file types
the go.mod file
GOPATH environment variable
legacy GOPATH go get
module proxy protocol
import path syntax
modules, module versions, and more
module-aware go get
module authentication using go.sum
package lists and patterns
configuration for downloading non-public code
testing flags
testing functions
controlling version control with GOVCS

Use "go help <topic>" for more information about that topic.


go-build(1), go-clean(1).


This manual page was written by Michael Stapelberg <> and is maintained by the Debian Go Compiler Team <> based on the output of ‘go help’ for the Debian project (and may be used by others).