Version: v0.0.0-...-64c0246 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0



Package cfg holds configuration shared by multiple parts of the go command.



This section is empty.


View Source
var (
	BuildA                 bool   // -a flag
	BuildBuildmode         string // -buildmode flag
	BuildContext           = build.Default
	BuildI                 bool               // -i flag
	BuildLdflags           []string           // -ldflags flag
	BuildLinkshared        bool               // -linkshared flag
	BuildMSan              bool               // -msan flag
	BuildN                 bool               // -n flag
	BuildO                 string             // -o flag
	BuildP                 = runtime.NumCPU() // -p flag
	BuildPkgdir            string             // -pkgdir flag
	BuildRace              bool               // -race flag
	BuildToolexec          []string           // -toolexec flag
	BuildToolchainName     string
	BuildToolchainCompiler func() string
	BuildToolchainLinker   func() string
	BuildV                 bool // -v flag
	BuildWork              bool // -work flag
	BuildX                 bool // -x flag

These are general "build flags" used by build and other commands.

View Source
var (
	Goarch    string
	Goos      string
	ExeSuffix string
	Gopath    []string

Global build parameters (used during package load)

View Source
var (
	GOROOT    = filepath.Clean(runtime.GOROOT())
	GOBIN     = os.Getenv("GOBIN")
	GOROOTbin = filepath.Join(GOROOT, "bin")
	GOROOTpkg = filepath.Join(GOROOT, "pkg")
	GOROOTsrc = filepath.Join(GOROOT, "src")
View Source
var CmdEnv []EnvVar

CmdEnv is the new environment for running go tool commands. User binaries (during go test or go run) are run with OrigEnv, not CmdEnv.

View Source
var OrigEnv []string

OrigEnv is the original environment of the program at startup.

View Source
var TestCoverMode string // -covermode flag

The test coverage mode affects package loading. Sigh.


This section is empty.


type EnvVar

type EnvVar struct {
	Name  string
	Value string

An EnvVar is an environment variable Name=Value.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL