其他分享
首页 > 其他分享> > [Golang] go env命令的意思

[Golang] go env命令的意思

作者:互联网

go env :查看go语言的环境变量信息

有几个环境变量是需要注意的

GOPATH 这个是我们的第三方库下载的位置

GO111MODULE 看看go modules是否开启了

GOPROXY 代理的网站

set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\64644\AppData\Local\go-build
set GOENV=C:\Users\64644\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\64644\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\64644\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=D:\software\go1.17.6\go1.17.6
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\software\go1.17.6\go1.17.6\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.6
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\software\goworkspace\go-fly-pro\go.mod
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\64644\AppData\Local\Temp\go-build713179366=/tmp/go-build -gno-rec
ord-gcc-switches

 

标签:set,Users,CGO,go1.17,Golang,env,64644,go
来源: https://www.cnblogs.com/taoshihan/p/15881651.html