【Golang】go Module配置及使用

goPath是一个历史产物  go1.11之前代码只能写在GOPATH下面,新版本配置GO111MODULE="on"

GOPROXY="https://goproxy.cn,direct"

命令配置

go env -w GOPROXY=https://goproxy.cn,direct

或者export GOPROXY=https://goproxy.cn,direct

猜你喜欢

转载自www.cnblogs.com/songgj/p/8684336.html