Windows平台下找到cmd,输入`go env`即可查看golang环境配置详情
C:\Users\erbin>go env
set GO111MODULE=
set GOARCH=amd64 // GOARCH表示目标处理器架构
set GOBIN= // GOBIN表示编译器和链接器的安装位置
set GOCACHE=C:\Users\erbin\AppData\Local\go-build
set GOENV=C:\Users\erbin\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\erbin\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows // 目标操作系统
set GOPATH=C:\Users\erbin\go // GOPATH表示当前工作目录
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\ernv\go // 表示Go开发包的安装目录
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\ernv\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
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\erbin\AppData\Local\Temp\go-build803783302=/tmp/go-build -gno-record-gcc-switches