参考:https://www.jianshu.com/p/a537ee63d606
大概一共下面几种方法
- git clone 到相应的路径
mkdir $GOPATH/src/golang.org/x cd $GOPATH/src/golang.org/x git clone git@github.com:golang/text.git rm -rf text/.git
- proxy 环境变量
- go_proxy
export GOPROXY=https://goproxy.io
- http_proxy
export http_proxy=http://proxyAddress:port export https_proxy=http://proxyAddress:port
- go_proxy
- go 官方的映射
- 第三方工具
- gopm
go get github.com/gpmgo/gopm gopm get github.com/golang/snappy
- gopm