go

The Go toolchain: an exact upstream release, or the distribution package.

Installs the Go compiler and gofmt.

devtools:
  - name: go

Version behaviour

versionDebian / UbuntuAlpine
omittedthe distribution’s golang-go packagethe distribution’s go package
setthe official upstream tarball for that exact release, unpacked into /usr/local/gothe distribution package (the official tarball is glibc-only)

A pinned version must be an exact upstream release number — 1.22.5, not 1.22 and not latest. The tarball is fetched for the workstation’s architecture and go and gofmt are symlinked onto /usr/local/bin, so they are on every login shell’s PATH.

Example

A config that pins the toolchain for a Go service and its linter:

apiVersion: workstations.ringleader.dev/v1
kind: WorkstationConfig
metadata:
  name: go-dev
  namespace: local
spec:
  selector:
    matchLabels:
      stack: go
  packages:
    - git
  devtools:
    - name: go
      version: "1.22.5"
    - name: golangci-lint      # picks up the toolchain installed above

Declaring go before golangci-lint matters: golangci-lint is installed with the Go toolchain, and devtools install in declared order, so the pinned toolchain is the one that builds it.

Notes

  • Re-pinning the version reinstalls Go on the next setup run; /usr/local/go is replaced, not merged.
  • The workstation is considered to have this devtool once go resolves on PATH.
  • On Alpine the version field is accepted but has no effect — the musl workstation always gets the distribution package.