unusedinterface
finds unused interface in their package.
$ go install github.com/cloverrose/unusedinterface/cmd/unusedinterface@latest
$ go build -o bin/ ./cmd/...
$ go vet -vettool=`which unusedinterface` ./...
https://golangci-lint.run/plugins/module-plugins/
Here are reference settings
.custom-gcl.yml
# https://golangci-lint.run/plugins/module-plugins/
version: v1.62.0
name: custom-golangci-lint
destination: bin
plugins:
- module: 'github.com/cloverrose/unusedinterface'
import: 'github.com/cloverrose/unusedinterface'
version: v0.2.3
.golangci.yml
linters-settings:
custom:
unusedinterface:
type: "module"
description: check unused interface
This repo is an example https://github.com/cloverrose/linter-playground