GO-VET(1)
π go-vet(1) β the manual, but make it make sense
okay bestie, we're doing the GO-VET page. this is a Go programming tools and commands situation and honestly? it's giving "your code has opinions and so do we." π¦
β¨ NAME β¨
go-vet β report likely mistakes in packages. that's it, that's the whole personality. your code's little snitch, but in a helpful way π«Ά
π SEE ALSO π (yes it's up here, we don't make the rules)
go vet [build flags] [-vettool prog] [vet flags] [packages]
that's the shape of it. flags, tool, flags, packages. iconic order honestly β¨
πΈ DESCRIPTION πΈ
Vet runs the Go vet tool (cmd/vet) on the named packages and reports diagnostics. so like. you point it at your packages, it reads them, and it comes back with "hey girl this looks sus" β except professionally π
π OPTIONS π
It supports these flags, and we are listing all of them, no skips, no cap:
-c intβ display offending line with this many lines of context (default-1). yes, it's anint, yes the default is-1, that's literally what it says π-jsonβ emit JSON output. for when you want your diagnostics machine-readable and honestly kind of aesthetic π-fixβ instead of printing each diagnostic, apply its first fix (if any). note the "if any" bestie, some diagnostics just don't come with a fix β¨-diffβ instead of applying each fix, print the patch as a unified diff. so you can look at the patch before you commit to it π
π οΈ the -vettool=prog moment π οΈ
The -vettool=prog flag selects a different analysis tool with alternative or additional checks. you're not stuck with the default, you can swap in your own girlies π₯
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@latest
go vet -vettool=$(which shadow)
real talk: Alternative vet tools should be built atopgolang.org/x/tools/go/analysis/unitchecker, which handles the interaction withgo vet. that's the contract, don't skip it.
π the default tool π
The default vet tool is go tool vet or cmd/vet. that's who's showing up when you don't specify anyone π
- For help on its checkers and their flags, run
go tool vet help. - For details of a specific checker such as
printf, seego tool vet help printf. (yes literally just say the checker's name, it's so simple slay β¨) - For more about specifying packages, see
go help packages.
π build flags, bestie π
The build flags supported by go vet are those that control package resolution and execution, such as -C, -n, -x, -v, -tags, and -toolexec. write those down. every single one. -C, -n, -x, -v, -tags, -toolexec π
For more about these flags, see go help build.
π SEE ALSO π
go fmt(1)go fix(1)
π AUTHOR π
This manual page was created using help2man and afterwards updating the output. It is maintained by the Debian Go Compiler Team <team+go-compiler@tracker.debian.org> for the Debian project (and may be used by others).
the "created using help2man and afterwards updating the output" is lowkey the most relatable origin story ever and I respect it π«Ά
and that's the whole page, diva π¦ go forth, run go vet, let it read you to filth (lovingly). mwah π
this has been Go 1.27, August 2026, GO-VET(1) β thanks for coming to my ted talk β¨βπ
π¦ where this page comes from
- ubuntu stonking: golang-go 2:1.27~1 Β· Go
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms