【golang基础】golang环境变量
作者:互联网
go环境变量
[root@bogon ~]# go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE="git.cloud.top"
GONOPROXY="git.cloud.top"
GONOSUMDB="git.cloud.top"
GOOS="linux"
GOPATH="/root/go/" //Go语言工作目录
GOPRIVATE="git.cloud.top"
GOPROXY="https://goproxy.io/" //GOPROXY代理
GOROOT="/usr/local/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build449229643=/tmp/go-build -gno-record-gcc-switches"
例如设置
go env -w GOPROXY=https://goproxy.io
标签:git,CGO,top,基础,O2,golang,go,环境变量,cloud 来源: https://blog.csdn.net/oceanstudy123/article/details/121797053