golint
TLDR
Lint current package
SYNOPSIS
golint [options] [packages]
DESCRIPTION
golint checks Go source code for style issues. It enforces the style guidelines from Effective Go and the Go Code Review Comments, focusing on naming conventions, comments, and code structure.
Unlike go vet which finds bugs, golint focuses on style and readability. Issues are suggestions, not errors.
PARAMETERS
-min_confidence n
Minimum confidence for issues (0.0-1.0).-set_exit_status
Exit with non-zero status on issues.packages
Package paths to lint.
COMMON ISSUES
- Package comments should be of the form "Package x..."
- Receiver names should be consistent
- Don't use underscores in Go names
- Error strings should not be capitalized
CAVEATS
Deprecated in favor of staticcheck or golangci-lint. Suggestions are stylistic, not bugs. High false-positive rate for some projects. Not actively maintained.
HISTORY
golint was created by the Go team at Google as a style checker. It was deprecated in 2021 in favor of more comprehensive linters like staticcheck. The project recommends using golangci-lint which includes multiple linters.
SEE ALSO
go(1), gofmt(1), staticcheck(1), golangci-lint(1)


