vet
Go static analysis tool
TLDR
Check package
SYNOPSIS
go vet [-n] [-x] [-json] [packages]
DESCRIPTION
go vet performs static analysis on Go source code to find common programming mistakes that the compiler does not catch. It checks for issues such as incorrect printf format strings, unreachable code, suspicious function calls, and misuse of sync primitives.
The tool is part of the standard Go toolchain and runs without executing the code. It is typically used alongside tests and linters as part of a continuous integration workflow to catch bugs early in development.
PARAMETERS
-n
Print commands.-x
Print commands as run.-json
JSON output.-all
Run all analyzers../...
All packages.
CAVEATS
Go-specific. Not all bugs found. Use with tests.
HISTORY
go vet is part of the Go toolchain, providing static analysis to find common programming mistakes.
SEE ALSO
go(1), golint(1), staticcheck(1)
