Last Updated: May 22, 2026
The Go compiler is strict about types and unused variables, but it cheerfully accepts code that's almost certainly wrong: a mutex copied by value, an err checked against the wrong variable, a defer that captures a loop variable. Linters catch those. This chapter covers go vet, gofmt, staticcheck, and golangci-lint, what each one finds, how to wire them into your editor and CI, and how to suppress the rare false positive without poisoning your codebase.