The zerolint
linter checks usage patterns of pointers to zero-size variables in Go.
go install fillmore-labs.com/zerolint@latest
Usage: zerolint [-flag] [package]
Flags:
- -c int display offending line with this many lines of context (default -1)
- -basic basic analysis only
- -excluded
<filename>
read excluded types from this file - -zerotrace trace found zero-sized types
- -fix apply all suggested fixes