Go tools
Go, gopls, delve and golangci-lint: the Go toolchain and the tools around it.
Go builds zc-workstation itself. Homebrew installs the toolchain and three tools that editors and AI agents lean on: gopls, the language server; delve, the debugger; and golangci-lint, the linter that also enforces which package may import which.
On the workstation
-
Installed by the
go,gopls,delveandgolangci-lintformulae. -
Code generators a project needs, such as sqlc or oapi-codegen, are pinned with a
tooldirective in that project’sgo.modand run throughgo tool, never installed globally. -
A project drives everything through
make:make lint,make test,make build. The targets wire up the flags that raw commands miss. -
VS Code and Claude Code find
goplsonPATH, so both get the same definitions, references and diagnostics.
Keys and commands
| Key or command | Does |
|---|---|
|
Run one test |
|
Run every test with the race detector |
|
Run a tool pinned in |
|
Pin a tool in |
|
Lint with the project’s |
|
Debug the tests of one package |
|
Debug a program with its arguments |
|
Print a file’s diagnostics, as an editor sees them |
With zc-workstation
The repository’s .golangci.yml turns on depguard with rules such as
plan-performs-no-io: the plan package may not import net/http or run a
command. make lint fails when one of these import boundaries is crossed,
before review sees it.
$ make lint
go vet ./...
0 issues.
Edit this page Last updated