internal/wire: add package name to unused provider message (#162)
Fixes #161
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user