toolsgolang.org/x/tools/internal/goroot Index | Files

package goroot

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

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.

Index

Functions

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.

Source Files

importcfg.go

Version
v0.30.0 (latest)
Published
Feb 10, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
8 hours ago

Tools for package owners.