go/src/cmd/go/internal/cfg/cfg.go

var Goos

var Goarch

var ExeSuffix

var ModulesEnabled

func exeSuffix() string {}

var installedGOOS

var installedGOARCH

// ToolExeSuffix returns the suffix for executables installed
// in build.ToolDir.
func ToolExeSuffix() string {}

var BuildA

var BuildBuildmode

var BuildBuildvcs

var BuildContext

var BuildMod

var BuildModExplicit

var BuildModReason

var BuildLinkshared

var BuildMSan

var BuildASan

var BuildCover

var BuildCoverMode

var BuildCoverPkg

var BuildN

var BuildO

var BuildP

var BuildPGO

var BuildPkgdir

var BuildRace

var BuildToolexec

var BuildToolchainName

var BuildTrimpath

var BuildV

var BuildWork

var BuildX

var ModCacheRW

var ModFile

var CmdName

var DebugActiongraph

var DebugTrace

var DebugRuntimeTrace

var GoPathError

var GOPATHChanged

var CGOChanged

func defaultContext() build.Context {}

func init() {}

// SetGOROOT sets GOROOT and associated variables to the given values.
//
// If isTestGo is true, build.ToolDir is set based on the TESTGO_GOHOSTOS and
// TESTGO_GOHOSTARCH environment variables instead of runtime.GOOS and
// runtime.GOARCH.
func SetGOROOT(goroot string, isTestGo bool) {}

var RawGOEXPERIMENT

var CleanGOEXPERIMENT

var Experiment

var ExperimentErr

func init() {}

type EnvVar

var OrigEnv

var CmdEnv

var envCache

// EnvFile returns the name of the Go environment configuration file,
// and reports whether the effective value differs from the default.
func EnvFile() (string, bool, error) {}

func initEnvCache() {}

func readEnvFile(file string, source string) {}

// Getenv gets the value for the configuration key.
// It consults the operating system environment
// and then the go/env file.
// If Getenv is called for a key that cannot be set
// in the go/env file (for example GODEBUG), it panics.
// This ensures that CanGetenv is accurate, so that
// 'go env -w' stays in sync with what Getenv can retrieve.
func Getenv(key string) string {}

// CanGetenv reports whether key is a valid go/env configuration key.
func CanGetenv(key string) bool {}

var GOROOT

var GOROOTbin

var GOROOTpkg

var GOROOTsrc

var GOBIN

var (
	GOMODCACHE
	GOMODCACHEChanged
)

var (
	GOARM64
	goARM64Changed
)

var (
	GOARM
	goARMChanged
)

var (
	GO386
	go386Changed
)

var (
	GOAMD64
	goAMD64Changed
)

var (
	GOMIPS
	goMIPSChanged
)

var (
	GOMIPS64
	goMIPS64Changed
)

var (
	GOPPC64
	goPPC64Changed
)

var (
	GORISCV64
	goRISCV64Changed
)

var (
	GOWASM
	goWASMChanged
)

var (
	GOPROXY
	GOPROXYChanged
)

var (
	GOSUMDB
	GOSUMDBChanged
)

var GOPRIVATE

var (
	GONOPROXY
	GONOPROXYChanged
)

var (
	GONOSUMDB
	GONOSUMDBChanged
)

var GOINSECURE

var GOVCS

var (
	GOAUTH
	GOAUTHChanged
)

// EnvOrAndChanged returns the environment variable value
// and reports whether it differs from the default value.
func EnvOrAndChanged(name, def string) (v string, changed bool) {}

var SumdbDir

// GetArchEnv returns the name and setting of the
// GOARCH-specific architecture environment variable.
// If the current architecture has no GOARCH-specific variable,
// GetArchEnv returns empty key and value.
func GetArchEnv() (key, val string, changed bool) {}

// envOr returns Getenv(key) if set, or else def.
func envOr(key, def string) string {}

// findGOROOT returns the GOROOT value, using either an explicitly
// provided environment variable, a GOROOT that contains the current
// os.Executable value, or else the GOROOT that the binary was built
// with from runtime.GOROOT().
//
// There is a copy of this code in x/tools/cmd/godoc/goroot.go.
func findGOROOT(env string) string {}

// isSameDir reports whether dir1 and dir2 are the same directory.
func isSameDir(dir1, dir2 string) bool {}

// isGOROOT reports whether path looks like a GOROOT.
//
// It does this by looking for the path/pkg/tool directory,
// which is necessary for useful operation of the cmd/go tool,
// and is not typically present in a GOPATH.
//
// There is a copy of this code in x/tools/cmd/godoc/goroot.go.
func isGOROOT(path string) bool {}

func gopathDir(rel string) string {}

// Keep consistent with go/build.defaultGOPATH.
func gopath(ctxt build.Context) string {}

// WithBuildXWriter returns a Context in which BuildX output is written
// to given io.Writer.
func WithBuildXWriter(ctx context.Context, xLog io.Writer) context.Context {}

type buildXContextKey

// BuildXWriter returns nil if BuildX is false, or
// the writer to which BuildX output should be written otherwise.
func BuildXWriter(ctx context.Context) (io.Writer, bool) {}