go-get

Add a dependency package, or download packages in legacy GOPATH mode.

TLDR

Add a specified package to go.mod in module-mode or install the package in GOPATH-mode

$ go get [example.com/pkg]
copy

Modify the package with a given version in module-aware mode

$ go get [example.com/pkg]@[v1.2.3]
copy

Remove a specified package

$ go get [example.com/pkg]@[none]
copy

Copied to clipboard
3commas