Use claude-go or codex-go for Go projects. The image includes the Go
toolchain and standard library source, cgo support, GCC, Clang, Delve, and these
project tools:
gofmt,gofumpt,goimportsstaticcheck,golangci-lint,gosec,govulncheckgopls,gotestsum,semgrep
See the root README for build, authentication, and launch commands.
The build uses the current stable Go release unless GO_VERSION is set:
GO_VERSION=go1.25.0 ./go/build.shGOTOOLCHAIN=auto allows Go to download the version required by go.mod.
Use GOTOOLCHAIN=local to force the bundled version.
cgo is enabled, so the race detector works without extra setup:
go test -race ./...Clang is available for Go's memory sanitizers:
CC=clang go test -msan ./...
CC=clang go test -asan ./...Set CGO_ENABLED=0 when building a pure-Go static binary. The race detector and
memory sanitizers require cgo.
Container caches are ephemeral. Mount volumes to retain them:
docker run --rm -it \
-v "$PWD:/workspace" \
-v go-mod-cache:/root/go/pkg/mod \
-v go-build-cache:/root/.cache/go-build \
codex-go