package importer

import "cmd/compile/internal/importer"

package importer implements package reading for gc-generated object files.

Index

Functions

func Import

func Import(packages map[string]*types2.Package, path, srcDir string, lookup func(path string) (io.ReadCloser, error)) (pkg *types2.Package, err error)

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.

This function should only be used in tests.

func ReadPackage

func ReadPackage(ctxt *types2.Context, imports map[string]*types2.Package, input pkgbits.PkgDecoder) *types2.Package

Source Files

gcimporter.go support.go ureader.go

Version
v1.24.0 (latest)
Published
Feb 10, 2025
Platform
linux/amd64
Imports
12 packages
Last checked
7 minutes ago

Tools for package owners.