7
vendor/sigs.k8s.io/controller-tools/pkg/loader/loader.go
generated
vendored
7
vendor/sigs.k8s.io/controller-tools/pkg/loader/loader.go
generated
vendored
@@ -243,6 +243,9 @@ func (l *loader) typeCheck(pkg *Package) {
|
||||
|
||||
// The imports map is keyed by import path.
|
||||
importedPkg := pkg.Imports()[path]
|
||||
if importedPkg == nil {
|
||||
return nil, fmt.Errorf("package %q possibly creates an import loop", path)
|
||||
}
|
||||
|
||||
// it's possible to have a call to check in parallel to a call to this
|
||||
// if one package in the package graph gets its dependency filtered out,
|
||||
@@ -255,10 +258,6 @@ func (l *loader) typeCheck(pkg *Package) {
|
||||
importedPkg.Lock()
|
||||
defer importedPkg.Unlock()
|
||||
|
||||
if importedPkg == nil {
|
||||
return nil, fmt.Errorf("no package information for %q", path)
|
||||
}
|
||||
|
||||
if importedPkg.Types != nil && importedPkg.Types.Complete() {
|
||||
return importedPkg.Types, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user