📝 Edit page
➕ Add page
Commands
Reference for subcommands of the
go
command
Topics
Pages
Content
Doc links
- Commands reference in the docs.
- go command reference. This lists available commands and then shows usage for each. All on one page. This saves having to run
go help
for each.
Overview of common commands
Command | Description |
---|---|
build |
compile packages and dependencies |
install |
compile and install packages and dependencies |
fmt |
gofmt (reformat) package sources |
run |
compile and run Go program |
version |
print Go version |
All commands
bug start a bug report
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
fix update packages to use new APIs
fmt gofmt (reformat) package sources
generate generate Go files by processing source
get add dependencies to current module and install them
install compile and install packages and dependencies
list list packages or modules
mod module maintenance
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages