wire: fill in ProviderSet.VarName when the set is a package variable (google/go-cloud#279)
Rename ProviderSet.Name to ProviderSet.VarName. Fixes google/go-cloud#277
This commit is contained in:
committed by
Ross Light
parent
85deb53791
commit
3a3760180d
@@ -217,8 +217,8 @@ func gather(info *wire.Info, key wire.ProviderSetID) (_ []outGroup, imports map[
|
||||
continue
|
||||
}
|
||||
visited[curr] = struct{}{}
|
||||
if curr.Name != "" && !(curr.PkgPath == key.ImportPath && curr.Name == key.VarName) {
|
||||
imports[formatProviderSetName(curr.PkgPath, curr.Name)] = struct{}{}
|
||||
if curr.VarName != "" && !(curr.PkgPath == key.ImportPath && curr.VarName == key.VarName) {
|
||||
imports[formatProviderSetName(curr.PkgPath, curr.VarName)] = struct{}{}
|
||||
}
|
||||
for _, imp := range curr.Imports {
|
||||
next = append(next, imp)
|
||||
|
||||
Reference in New Issue
Block a user