mirror of
https://github.com/golang/go
synced 2024-11-18 17:54:57 -07:00
cmd/go: show $GOPATH in 'go env' output
Also, sort output. R=golang-dev, patrick, dave, iant CC=golang-dev, patrick https://golang.org/cl/6446064
This commit is contained in:
parent
e53351013d
commit
7711e61031
@ -6,6 +6,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
@ -33,16 +34,17 @@ func mkEnv() []envVar {
|
||||
b.init()
|
||||
|
||||
env := []envVar{
|
||||
{"GOROOT", goroot},
|
||||
{"GOBIN", gobin},
|
||||
{"GOARCH", goarch},
|
||||
{"GOBIN", gobin},
|
||||
{"GOCHAR", archChar},
|
||||
{"GOOS", goos},
|
||||
{"GOEXE", exeSuffix},
|
||||
{"GOGCCFLAGS", strings.Join(b.gccCmd(".")[3:], " ")},
|
||||
{"GOHOSTARCH", runtime.GOARCH},
|
||||
{"GOHOSTOS", runtime.GOOS},
|
||||
{"GOOS", goos},
|
||||
{"GOPATH", os.Getenv("GOPATH")},
|
||||
{"GOROOT", goroot},
|
||||
{"GOTOOLDIR", toolDir},
|
||||
{"GOGCCFLAGS", strings.Join(b.gccCmd(".")[3:], " ")},
|
||||
}
|
||||
|
||||
if buildContext.CgoEnabled {
|
||||
|
Loading…
Reference in New Issue
Block a user