Skip to content
cheatsheet
home
/
cv
/
weblog
/
cheatsheet
/
proxy
/
vpn
/
status
/
links
EN
RU
☾
New version available
reload
×
cheatsheet
/
go
/
Add a dependency
Add a dependency
go
Download a specific module version and update go.mod
go get github.com/some/pkg@v1.2.3
⎘ copy
#go
more go
all 10 commands →
Tidy up module dependencies
go mod tidy
Vendor dependencies
go mod vendor
CPU profiling
go test -cpuprofile=cpu.prof -bench=. ./... && go tool pprof cpu.prof
List all packages
go list ./...
Format all code
gofmt -w .