package gcimporter

Import Path
	golang.org/x/tools/internal/gcimporter (on go.dev)

Dependency Relation
	imports 25 packages, and imported by one package

Involved Source Files bexport.go bimport.go exportdata.go Package gcimporter provides various functions for reading gc-generated object files that can be used to implement the Importer interface defined by the Go 1.5 standard library package. iexport.go iimport.go newInterface11.go support_go118.go unified_no.go ureader_yes.go
Package-Level Type Names (total 26, in which 1 are exported)
/* sort exporteds by: | */
InsertType is the type of a function that creates a types.TypeName object for a named type and inserts it into the scope of the specified Package.
Package-Level Functions (total 41, in which 12 are exported)
BExportData returns binary export data for pkg. If no file set is provided, position info will be missing.
BImportData imports a package from the serialized package data and returns the number of bytes consumed and a reference to the package. If the export data version is not recognized or the format is otherwise compromised, an error is returned.
FindExportData positions the reader r at the beginning of the export data section of an underlying GC-created object/archive file by reading from it. The reader must be positioned at the start of the file before calling this function. The hdr result is the string before the export data, either "$$" or "$$B". The size result is the length of the export data in bytes, or -1 if not known.
FindPkg returns the filename and unique package id for an import path based on package information provided by build.Import (using the build.Default build.Context). A relative srcDir is interpreted relative to the current working directory. If no file was found, an empty filename is returned.
IExportBundle writes an indexed export bundle for pkgs to out.
IExportData writes indexed export data for pkg to out. If no file set is provided, position info will be missing. The package path of the top-level package will not be recorded, so that calls to IImportData can override with a provided package path.
IExportShallow encodes "shallow" export data for the specified package. No promises are made about the encoding other than that it can be decoded by the same version of IIExportShallow. If you plan to save export data in the file system, be sure to include a cryptographic digest of the executable in the key to avoid version skew.
IImportBundle imports a set of packages from the serialized package bundle.
IImportData imports a package from the serialized package data and returns 0 and a reference to the package. If the export data version is not recognized or the format is otherwise compromised, an error is returned.
IImportShallow decodes "shallow" types.Package data encoded by IExportShallow in the same executable. This function cannot import data from cmd/compile or gcexportdata.Write.
Import imports a gc-generated package given its import path and srcDir, adds the corresponding package object to the packages map, and returns the object. The packages map must contain all packages already imported.
func UImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error)
Package-Level Variables (total 7, none are exported)
Package-Level Constants (total 55, none are exported)