Set up your toolchain

One install, one command

Swift needed Xcode. Go needs just the Go toolchain:

  1. Go 1.22+ β€” the compiler, formatter, and tools in one download (macOS: brew install go, or grab the installer from go.dev).
  2. That's it. No separate package manager to install β€” go itself fetches dependencies, builds, tests, and formats.

A Go project is defined by a go.mod file at its root β€” the equivalent of Package.swift. It names the module and pins dependency versions. You create it once with go mod init.