go get
gopm : https://github.com/gpmgo/gopm
-
安装 gopm
go get -u github.com/gpmgo/gopm
-
下载包,使用
gopm get
代替go get
gopm get -u -v [包地址]
-
安装包
gopm bin -u -v [包地址]
go module
goproxy : https://goproxy.io/
在执行诸如 go build
等命令前,先执行以下语句:
-
Bash (MAC/Linux)
export GOPROXY=https://goproxy.io
-
PowerShell (Windows)
$env:GOPROXY = "https://goproxy.io"