Not directly translated.
The Go compilation environment can be customized by environment variables. None is requiredby the build, but wish to set some to override the defaults.
$GOROOTThe root of the Go tree, often $HOME/go . Its value is built into the tree when it's compiled, and defaults to the parent of the directory where was all.bash run. There is no need to set this unless you want to switch between multiple local copies of the repository.
$GOROOT_FINALThe value assumed by installed binaries, and scripts when are not $GOROOT set explicitly. It defaults to the value of $GOROOT . If you want to build the Go tree on one location but move it elsewhere after the build, set to the $GOROOT_FINAL eventual location .
$GOOSand$GOARCHThe name of the target operating system and compilation architecture. These default to the values of $GOHOSTOS and $GOHOSTARCH respectively (described below).
Choices for $GOOS is darwin (Mac OS X 10.6 and above),,,,,,, dragonfly freebsd linux netbsd openbsd plan9 and solaris windows . Choices for $GOARCH is amd64 (64-bit x86, the most mature port), 386 (32-bit x86), and arm (32-bit ARM). The valid combinations of and are $GOOS $GOARCH :
|
$GOOS |
$GOARCH |
|
darwin |
386 |
|
darwin |
amd64 |
|
dragonfly |
386 |
|
dragonfly |
amd64 |
|
freebsd |
386 |
|
freebsd |
amd64 |
|
freebsd |
arm |
|
linux |
386 |
|
linux |
amd64 |
|
linux |
arm |
|
netbsd |
386 |
|
netbsd |
amd64 |
|
netbsd |
arm |
|
openbsd |
386 |
|
openbsd |
amd64 |
|
plan9 |
386 |
|
plan9 |
amd64 |
|
solaris |
amd64 |
|
windows |
386 |
|
windows |
amd64 |
$GOHOSTOSand$GOHOSTARCHThe name of the host operating system and compilation architecture. These default to the local system ' s operating system and architecture.
Valid Choices $GOOS $GOARCH is the same as for and, listed above. The specified values must is compatible with the local system. For example, you should the not set to on an $GOHOSTARCH arm x86 system.
$GOBINThe location where Go binaries would be installed. The default is $GOROOT/bin . After installing, you'll want to arrange-to-add this directory $PATH to your and so can use the tools. If $GOBIN is set, the GO command installs all commands there.
Go language: Some environment variables