Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.73 KB

golang-cheatsheet.md

File metadata and controls

37 lines (28 loc) · 1.73 KB

Golang Commands for Developers

Table of Contents

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.

🔼Back to Top

Basic Commands

Command Description
go build compile packages and dependencies
go clean remove object files and cached files
go doc show documentation for package or symbol
go env print Go environment information
go fix update packages to use new APIs
go fmt gofmt (reformat) package sources
go generate generate Go files by processing source
go get add dependencies to current module and install them
go install compile and install packages and dependencies
go list list packages or modules
go mod module maintenance
go run compile and run Go program
go test test packages
go tool run specified go tool
go version print Go version
go vet report likely mistakes in packages

🔼Back to Top