Check Go source code and report suspicious constructs (e.g. lint your Go source files).
Check the Go package in the current directory
$ go vet
Check the Go package in the specified path
$ go vet [path/to/file_or_directory]
List available checks that can be run with go vet
$ go tool vet help
View details and flags for a particular check
$ go tool vet help [check_name]
Display offending lines plus N lines of surrounding context
$ go vet -c=[N]
Output analysis and errors in JSON format
$ go vet -json
go vet [ -n ] [ -x ] [ packages ]
Vet runs the Go vet command on the packages named by the import paths.
For more about vet, see 'godoc vet'.
For more about specifying packages, see go-packages(7).
To run the vet tool with specific options, run 'go tool vet'.
The -n flag causes tool to print the command that would be executed but not execute it.
The -x flag causes clean to print remove commands as it executes them.
This manual page was written by Michael Stapelberg <email@example.com>, for the Debian project (and may be used by others).