Go/Golang

Go programming language commands and tools

19 commands
Search & Copy
Save Favorites
19
Total Commands
100%
Free Access
Lightning Fast

Available Commands

Click on any command to copy it instantly

19 commands available
19 of 19
go

Install Go

Install Go programming language

brew install go
go
golang
install
go

Check Go Version

Check installed Go version

go version
go
version
check
go

Initialize Go Module

Initialize a new Go module

go mod init example.com/myproject
go
module
init
go

Run Go Program

Run Go program directly

go run main.go
go
run
execute
go

Build Go Program

Build Go program into executable

go build -o myapp main.go
go
build
compile
go

Run Go Tests

Run Go test suite

go test ./...
go
test
testing
go

Install Dependencies

Download and install Go packages

go get github.com/gin-gonic/gin
go
get
dependencies
go

Module Management

Manage Go modules

go mod tidy
go
mod
modules
go

Format Go Code

Format Go source code

go fmt ./...
go
fmt
format
go

Static Analysis

Run Go static analysis

go vet ./...
go
vet
analysis
go

Install Go Tools

Install Go development tools

go install golang.org/x/tools/gopls@latest
go
tools
install
go

Code Generation

Run code generation tools

go generate ./...
go
generate
codegen
go

Clean Build Artifacts

Remove build artifacts

go clean -cache
go
clean
cache
go

List Packages

List Go packages and modules

go list -m all
go
list
packages
go

View Documentation

View Go package documentation

go doc fmt.Println
go
doc
documentation
go

Race Detection

Detect race conditions

go run -race main.go
go
race
concurrency
go

Profiling

Profile Go programs

go tool pprof cpu.prof
go
profile
performance
go

Benchmarking

Run Go benchmarks

go test -bench=.
go
benchmark
performance
go

Cross Compilation

Build for different platforms

GOOS=linux GOARCH=amd64 go build
go
cross
compile

Missing a command?

Help us improve this collection by suggesting commands that should be added. Your contributions help the entire developer community!