notparam
notparam
restricts not to use type parameters in declaration of functions and types.
Type parameter has not been released yet. You can try it with gotip.
Install
You can get notparam
by go install
command (Go 1.18 and higher).
$ go install github.com/gostaticanalysis/notparam/cmd/notparam@latest
How to use
notparam
run with go vet
as below when Go is 1.18 and higher.
$ go vet -vettool=$(which notparam) ./...
You can use notparam.Analyzer with unitchecker.