go-vet (1) - Linux Manuals
go-vet: report likely mistakes in packages
go-vet - report likely mistakes in packages
SYNOPSISgo vet [-n] [-x] [-vettool prog] [build flags] [vet flags] [packages]
DESCRIPTIONVet runs the Go vet command on the packages named by the import paths.
For more about vet and its flags, see 'go doc cmd/vet'.
For more about specifying packages, see go-packages(7).
For a list of checkers and their flags, see 'go tool vet help'.
For details of a specific checker such as 'printf', see 'go tool vet help printf'.
- The -n flag prints commands that would be executed.
- The -x flag prints commands as they are executed.
The -vettool=prog flag selects a different analysis tool with alternative
or additional checks.
For example, the 'shadow' analyzer can be built and run using these commands:
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow go vet -vettool=$(which shadow)
This manual page was written by Michael Stapelberg <stapelberg [at] debian.org> and is maintained by the Debian Go Compiler Team <team+go-compiler [at] tracker.debian.org> based on the output of 'go help vet' for the Debian project (and may be used by others).