pkgdep
checks if package dependency follows rule.
$ go install github.com/cloverrose/pkgdep/cmd/pkgdep@latest
$ go build -o bin/ ./cmd/...
See .pkgdep.json as example.
We can use *
as wild card.
$ go vet -vettool=`which pkgdep` -pkgdep.config=$(PWD)/.pkgdep.json ./...