gostaticanalysis / zerolit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zerolit

pkg.go.dev

zerolit finds return zero values but they are not literal.

Install

You can get zerolit by go install command (Go 1.16 and higher).

$ go install github.com/gostaticanalysis/zerolit@latest

How to use

zerolit run with go vet as below when Go is 1.12 and higher.

$ go vet -vettool=$(which zerolit) ./...

Analyze with golang.org/x/tools/go/analysis

You can get analyzers of zerolit from zerolit.Analyzers. And you can use them with unitchecker.

About

License:MIT License


Languages

Language:Go 100.0%