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 -u is set. It forces get -u to 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 πŸ’…πŸŒΈ