golang

Synopsis

Go is a tool for managing Go source code. The Go distribution includes a command, named ” go ”, that automates the downloading, building, installation, and testing of Go packages and commands. It helps developers use Golang more efficiently.

Basic Commands

CommandDescription
go buildcompile packages and dependencies
go cleanremove object files and cached files
go docshow documentation for package or symbol
go envprint Go environment information
go fixupdate packages to use new APIs
go fmtgofmt (reformat) package sources
go generategenerate Go files by processing source
go getadd dependencies to current module and install them
go installcompile and install packages and dependencies
go listlist packages or modules
go modmodule maintenance
go runcompile and run Go program
go testtest packages
go toolrun specified go tool
go versionprint Go version
go vetreport likely mistakes in packages