const trace … type Package … type PackageGraph … // BuildPackageGraph analyzes the package graph for the requested ids, whose // metadata is described by meta. // // The provided parse function is used to parse the CompiledGoFiles of each package. // // The resulting PackageGraph is fully evaluated, and may be investigated using // the Package method. // // See the package documentation for more information on the package reference // algorithm. func BuildPackageGraph(ctx context.Context, meta metadata.Source, ids []metadata.PackageID, parse func(context.Context, protocol.DocumentURI) (*parsego.File, error)) (*PackageGraph, error) { … } type futurePackage … // Package gets the result of analyzing references for a single package. func (g *PackageGraph) Package(ctx context.Context, id metadata.PackageID) (*Package, error) { … } // buildPackage parses a package and extracts its reference graph. It should // only be called from Package. func (g *PackageGraph) buildPackage(ctx context.Context, id metadata.PackageID) (*Package, error) { … } // reachesByDeps computes the set of packages that are reachable through // dependencies of the package m. func (g *PackageGraph) reachesByDeps(ctx context.Context, mp *metadata.Package) (*typerefs.PackageSet, error) { … }