go/build.Context.GOROOT (field)
32 uses
go/build (current package)
build.go#L40: GOROOT string // Go root
build.go#L239: if p == "" || p == ctxt.GOROOT {
build.go#L271: if ctxt.GOROOT != "" && ctxt.Compiler != "gccgo" {
build.go#L272: dir := ctxt.joinPath(ctxt.GOROOT, "src")
build.go#L339: c.GOROOT = filepath.Clean(goroot)
build.go#L626: if ctxt.GOROOT != "" {
build.go#L627: root := ctxt.joinPath(ctxt.GOROOT, "src")
build.go#L631: p.Root = ctxt.GOROOT
build.go#L643: if ctxt.GOROOT != "" && ctxt.Compiler != "gccgo" {
build.go#L644: if dir := ctxt.joinPath(ctxt.GOROOT, "src", sub); ctxt.isDir(dir) {
build.go#L715: if ctxt.Compiler != "gccgo" && ctxt.GOROOT != "" && searchVendor(ctxt.GOROOT, true) {
build.go#L726: if ctxt.GOROOT != "" {
build.go#L733: _, gorootFirst = ctxt.hasSubdir(ctxt.GOROOT, srcDir)
build.go#L736: dir := ctxt.joinPath(ctxt.GOROOT, "src", path)
build.go#L739: binaryOnly = !isDir && mode&AllowBinary != 0 && pkga != "" && ctxt.isFile(ctxt.joinPath(ctxt.GOROOT, pkga))
build.go#L743: p.Root = ctxt.GOROOT
build.go#L749: if ctxt.Compiler == "gccgo" && goroot.IsStandardPackage(ctxt.GOROOT, ctxt.Compiler, path) {
build.go#L753: p.Dir = ctxt.joinPath(ctxt.GOROOT, "src", path)
build.go#L755: p.Root = ctxt.GOROOT
build.go#L774: if ctxt.GOROOT != "" && tried.goroot == "" {
build.go#L775: dir := ctxt.joinPath(ctxt.GOROOT, "src", path)
build.go#L778: binaryOnly = !isDir && mode&AllowBinary != 0 && pkga != "" && ctxt.isFile(ctxt.joinPath(ctxt.GOROOT, pkga))
build.go#L782: p.Root = ctxt.GOROOT
build.go#L1149: if ctxt.GOROOT == "" {
build.go#L1184: if _, ok := ctxt.hasSubdir(filepath.Join(ctxt.GOROOT, "src"), absSrcDir); ok {
build.go#L1190: if dir := ctxt.joinPath(ctxt.GOROOT, "src", path); ctxt.isDir(dir) {
build.go#L1233: goCmd := filepath.Join(ctxt.GOROOT, "bin", "go")
build.go#L1251: "GOROOT="+ctxt.GOROOT,
golang.org/x/tools/internal/gcimporter
exportdata.go#L395: cmd := exec.Command(filepath.Join(build.Default.GOROOT, "bin", "go"), "list", "-export", "-f", "{{.Export}}", pkgDir)
exportdata.go#L396: cmd.Dir = build.Default.GOROOT
exportdata.go#L397: cmd.Env = append(os.Environ(), "PWD="+cmd.Dir, "GOROOT="+build.Default.GOROOT)