internal/wire: add package name to unused provider message (#162)

Fixes #161
This commit is contained in:
Jan Hájek
2019-05-02 18:57:08 +02:00
committed by Ross Light
parent d079521b6f
commit 2183ee4806
2 changed files with 2 additions and 2 deletions

View File

@@ -276,7 +276,7 @@ func verifyArgsUsed(set *ProviderSet, used []*providerSetSrc) []error {
}
}
if !found {
errs = append(errs, fmt.Errorf("unused provider %q", p.Name))
errs = append(errs, fmt.Errorf("unused provider %q", p.Pkg.Name() + "." + p.Name))
}
}
for _, v := range set.Values {

View File

@@ -1,6 +1,6 @@
example.com/foo/wire.go:x:y: inject injectBar: unused provider set "unusedSet"
example.com/foo/wire.go:x:y: inject injectBar: unused provider "provideUnused"
example.com/foo/wire.go:x:y: inject injectBar: unused provider "main.provideUnused"
example.com/foo/wire.go:x:y: inject injectBar: unused value of type string