go env set GOARCH=amd64set GOBIN=set GOCACHE=C..."/>
您好,登錄后才能下訂單哦!
d:\goprojects\src\day1\exp6>go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\goprojects
set GOPROXY=
set GORACE=
set GOROOT=D:\program Files\go
set GOTMPDIR=
set GOTOOLDIR=D:\program Files\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build131073830=/tmp/go-build -gno-record-gcc-switches
d:\goprojects\src\day1\exp6>set GOOS=linux
d:\goprojects\src\day1\exp6>go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=linux
set GOPATH=D:\goprojects
set GOPROXY=
set GORACE=
set GOROOT=D:\program Files\go
set GOTMPDIR=
set GOTOOLDIR=D:\program Files\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build488831346=/tmp/go-build -gno-record-gcc-switches
d:\goprojects\src\day1\exp6>go build
d:\goprojects\src\day1\exp6>
darwin
freebsd
linux
windows
android
dragonfly
netbsd
openbsd
plan9
solaris
一共支持10中操作系統(tǒng)。
arm
arm64
386
amd64
ppc64
ppc64le
mips64
mips64le
s390x
一共支持9中處理器的架構(gòu),GOOS和GOARCH組合起來,支持生成的可執(zhí)行程序種類很多
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。