GO-GET(1)
π NAME
go-get β bestie, this is the one that adds dependencies to your current module and installs them. β¨
πΈ SYNOPSIS
go get [-t] [-u] [-tool] [build flags] [packages]
π DESCRIPTION
okay so Get takes whatever you typed on the command line, resolves those args to packages at specific module versions, updates go.mod so it requires those versions, and pulls the source code down into the module cache. That's the whole job. She's focused. π
Wanna add a dependency for a package, or glow it up to its latest version? say less:
go get example.com/pkg
Wanna upgrade or downgrade a package to one specific version? we love a precise queen:
go get example.com/pkg@v1.2.3
Wanna remove a dependency on a module and downgrade the modules that require it? ok breaking up era:
go get example.com/mod@none
Wanna bump the minimum required Go version to the latest released Go version? periodt:
go get go@latest
Wanna upgrade the Go toolchain to the latest patch release of the current Go toolchain? so specific, so cute:
go get toolchain@patch
lowkey if you want the full lore, it's at https://go.dev/ref/mod#go-get π¦
not me about to spill the backstory π β in earlier versions of Go, go get was used to build and install packages. Now? go get is dedicated to adjusting dependencies in go.mod. That's her whole personality now. If you actually wanna build and install commands, go install is the girl for that. And when a version is specified, go install runs in module-aware mode and ignores the go.mod file in the current directory. literally ignores it. iconic. for example:
go install example.com/pkg@v1.2.3
go install example.com/pkg@latest
See go help install or https://go.dev/ref/mod#go-install for details. π
okay and go get accepts the following flags, so let's get into it β¨
-tβ tells get to consider the modules needed to build tests of the packages you named on the command line. tests deserve love too π«Ά-uβ tells get to update the modules providing dependencies of the packages named on the command line, using newer minor or patch releases when they're available. glow up window: open.-u=patchβ note the equals sign, bestie. not-u patch. this one also updates dependencies, but it changes the default so it picks patch releases. tiny change, big difference, iykyk π-toolβ tells go to add a matchingtoolline togo.modfor each listed package. and if you use-tooltogether with@none, that line gets removed. gone. ghosted. Seego help toolfor more info.-xβ prints commands as they're executed. super useful for debugging version control commands when a module is downloaded directly from a repository. chef's kiss for detective mode π
and when you use -t and -u together, get will update test dependencies as well. duo. dream team. π
For more about build flags, see go help build.
For more about modules, see https://go.dev/ref/mod.
For more about using go get to update the minimum Go version and suggested Go toolchain, see https://go.dev/doc/toolchain.
For more about specifying packages, see go help packages.
π¦ SEE ALSO
go build(1)go install(1)go clean(1)go mod(1)
β AUTHOR
This manual page was created using help2man and afterwards updating the output. It is maintained by the Debian Go Compiler Team <team+go-compiler@tracker.debian.org> for the Debian project (and may be used by others). respect the maintainers, they're doing the lord's work π
and that's the whole page, bestie π this is from Go 1.27, dated August 2026, filed under GO-GET(1) β go forth and manage your dependencies responsibly, no cap πβ¨
π¦ where this page comes from
- ubuntu stonking: golang-go 2:1.27~1 Β· Go
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms