package
0.31.0
Repository: https://go.googlesource.com/tools
Documentation: pkg.go.dev

# Functions

FindExportData positions the reader r at the beginning of the export data section of an underlying cmd/compile created archive file by reading from it.
FindPackageDefinition positions the reader r at the beginning of a package definition file ("__.PKGDEF") within a GC-created archive by reading from it, and returns the size of the package definition file in the archive.
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).
GetPackagesFromMap returns a GetPackagesFunc that retrieves packages from the given map of package path to package.
IExportBundle writes an indexed export bundle for pkgs to out.
IExportData writes indexed export data for pkg to out.
IExportShallow encodes "shallow" export data for the specified package.
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.
IImportShallow decodes "shallow" types.Package data encoded by [IExportShallow] in the same executable.
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.
ReadExportDataHeader reads the export data header and format from r.
ReadObjectHeaders reads object headers from the reader.
ReadUnified reads the contents of the unified export data from a reader r that contains the contents of a GC-created archive file.
No description provided by the author

# Structs

A GetPackagesItem is a request from the importer for the package symbol of the specified name and path.

# Type aliases

A GetPackagesFunc function obtains the non-nil symbols for a set of packages, creating and recursively importing them as needed.
ReportFunc is the type of a function used to report formatted bugs.