diff --git a/importer/importer.go b/importer/importer.go index 6c7a1610..cd004987 100644 --- a/importer/importer.go +++ b/importer/importer.go @@ -177,7 +177,7 @@ func (imp *Importer) LoadPackage(importPath string) (*PackageInfo, error) { if files, err := loadPackage(imp.config.Build, imp.Fset, importPath); err == nil { // Kick off asynchronous I/O and parsing for the imports. for path := range imports(importPath, files) { - go func() { imp.LoadPackage(path) }() + go func(path string) { imp.LoadPackage(path) }(path) } // Type-check the package.