Skip to content

golang

"Go is an open source programming language that makes it easy to build simple, reliable, and efficient software." - https://golang.org/

Golang keeps to a 6-month minor release cadence. See https://golang.org/doc/devel/release.html

Tips and examples

  • Default GOPATH is ${HOME}/go on unix systems.
  • See a bunch of other defaults with go env

View default go environment

go env

Build code found on github

go get github.com/solarkennedy/uq
go build github.com/solarkennedy/uq

With newer golang versions, you can simply go install github.com/solarkennedy/uq@latest

Show all modules used by a golang project

This will list all dependencies recursively in two columns with the library on the left and its direct dependencies on the right.

cd "$SOURCE_REPO"
go mod graph