GO-GOPATH-GET(1)
β¨ GO-GOPATH-GET(1) β¨
π NAME π
okay so this is the go-get manual, the legacy GOPATH version of go get π it's giving old-school vibes and I'm obsessed with it π¦
πΈ SYNOPSIS πΈ
Okay bestie, so go get acts totally different depending on whether the go command is running in module-aware mode or legacy GOPATH mode π this help text is what you read to understand go get in legacy GOPATH mode. You can pull it up with go help gopath-get even when you're in module-aware mode, so no stress π
go get [-d] [-f] [-t] [-u] [-v] [-fix] [build flags] [packages]
π¦ DESCRIPTION π¦
Okay so get downloads the packages named by the import paths, plus all their dependencies β¨ then it installs the named packages, just like go install does. Iconic π
-dβ this flag tells get to stop after downloading, so it won't install the packages. Main character energy for the download-only girlies π-fβ only valid when-uis set. It forcesget -uto skip verifying that each package was checked out from the source control repository implied by its import path. Lowkey useful if your source is a local fork of the original π§-fixβ tells get to run the fix tool on the downloaded packages before it resolves dependencies or builds the code π₯-tβ also downloads the packages needed to build the tests for the specified packages π-uβ uses the network to update the named packages and their dependencies. By default get uses the network to check out missing packages, but it does NOT go looking for updates to packages you already have π-vβ turns on verbose progress and debug output π«Ά
Okay so get also takes build flags to control the installation β¨ go check out go-build(1) for those π
When get checks out a brand new package, it creates the target directory GOPATH/src/<import-path> π¦ if your GOPATH has multiple entries, get just uses the first one. For more details, run go help gopath πΈ
When checking out or updating a package, get looks for a branch or tag that matches your locally installed version of Go. The most important rule is this: if your local install is running version "go1", get searches for a branch or tag named "go1" π if no such version exists, it grabs the default branch of the package instead.
When go get checks out or updates a Git repository, it also updates any git submodules referenced by that repository π
Get never checks out or updates code stored in vendor directories π ββοΈ hard boundary, no exceptions π
For more about specifying packages, see go-packages(7) π
For more about how go get finds the source code it downloads, see go-remote(7) π§
π SEE ALSO π
go-build(1), go-install(1), go-clean(1) π
π«Ά AUTHOR π«Ά
This manual page was written by Michael Stapelberg <stapelberg@debian.org> and is maintained by the Debian Go Compiler Team <team+go-compiler@tracker.debian.org>, based on the output of go help gopath-get for the Debian project (and it may be used by others) π
Bestie, this page was from GO-GOPATH-GET(1) with the General Commands Manual, last updated 2021-10-15 π¦β¨ slay forever π πΈ
π¦ where this page comes from
- debian bookworm: gccgo-go 2:1.19~1 Β· Go
- debian bookworm: golang-go 2:1.19~1 Β· Go
- debian trixie: gccgo-go 2:1.24~2 Β· Go
- debian trixie: golang-go 2:1.24~2 Β· Go
- ubuntu jammy: gccgo-go 2:1.18~0ubuntu2 Β· Go
- ubuntu jammy: golang-go 2:1.18~0ubuntu2 Β· Go
- ubuntu noble: gccgo-go 2:1.22~2build1 Β· Go
- ubuntu noble: golang-go 2:1.22~2build1 Β· Go
- ubuntu questing: gccgo-go 2:1.24~2
- ubuntu questing: golang-go 2:1.24~2 Β· Go
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms