Go Developer Tooling

My Go repos use several tools to make development easier. I develop on a Mac, so install instructions are MacOS-focused.

See example-go-cli for a repo using these tools.

Also see Go Project Notes.

golangci-lint

Run various correctness checks on source code.

demo gif

MacOS Install

brew install golangci-lint

Run locally

golangci-lint run

Note that with the lintTool set to golangci-lint, the Go VS Code extension will go install golangci-lint, despite the fact that this is explicitly recommended against. ¯_(ツ)_/¯

GoReleaser

Build platform-specific executables and auto-update Homebrew taps and Scoop buckets.

demo gif

MacOS Install

brew install goreleaser

Run locally

goreleaser --snapshot --skip-publish --clean

gotestsum

Run Go tests with easier to read output, including color.

example gif

MacOS Install

go install gotest.tools/gotestsum@latest

Run locally

gotestsum ./...

Lefthook

Install/Run/Uninstall pre-commit hooks that mimic CI.

MacOS Install

brew install lefthook

Then run this from repo-root

lefthook install

Run locally

  • install pre-commit hook: lefthook install
  • uninstall pre-commit hook: lefthook uninstall
  • Run pre-commit without committing: lefthook run pre-commit

panicparse

Make panic stack traces much easier to read with colorization and removing extraneous info

demo gif

MacOS Install

go install github.com/maruel/panicparse/v2/cmd/pp@latest

Run locally

go run . |& pp

VHS

Script demo GIF creation!

demo gif

MacOS Install

brew install vhs

Run locally

vhs < demo.tape