Lesson 30 of 60
GoTooling – `go fmt`, `go vet`, `golint`, and `staticcheck`
15 minutes
Course progress50%
Formatting & Linting
This lesson explains the main concept clearly with beginner-friendly examples and background so you can learn why the code works.
go fmt ./...– formats source according to the canonical style.go vet ./...– reports suspicious constructs.golint(deprecated) – style suggestions.staticcheck– advanced static analysis.
$ go install honnef.co/go/tools/cmd/staticcheck@latest
$ staticcheck ./...