...

Package goroot

import "golang.org/x/tools/internal/goroot"
Overview
Index

Overview ▾

Package goroot is a copy of package internal/goroot in the main GO repot. It provides a utility to produce an importcfg and import path to package file map mapping standard library packages to the locations of their export data files.

func Importcfg

func Importcfg() (string, error)

Importcfg returns an importcfg file to be passed to the Go compiler that contains the cached paths for the .a files for the standard library.

func PkgfileMap

func PkgfileMap() (map[string]string, error)

PkgfileMap returns a map of package paths to the location on disk of the .a file for the package. The caller must not modify the map.