Golang设置环境变量不生效的问题
当在Goland编辑器下面设置环境变量时.
如输入如下命令:
set GOPROXY=https://goproxy.cn,direct
发现此处的变量还是没有更换过来,找原因发现
golang版本小于1.13用此命令可以生效
set GOPROXY=https://goproxy.cn,direct
但版本大于等于1.13时输入
go env -w GOPROXY=https://goproxy.cn,direct
来设置,其他环境变量一样