A linter that reports interfaces with unnamed method parameters.
-skip-single-param
skip interfaces with a single unnamed parameter
You can run it standalone through go vet
.
You must install the binary to your $GOBIN
folder like so:
$ go install github.com/macabu/inamedparam/cmd/inamedparam@latest
And then navigate to your Go project's root folder, where can run go vet
in the following way:
$ go vet -vettool=$(which inamedparam) ./...
inamedparam
was added as a linter to golangci-lint
on version v1.55.0
. It is disabled by default.
To enable it, you can add it to your .golangci.yml
file, as such:
run:
deadline: 30s
linters:
disable-all: true
enable:
- inamedparam