解决go依赖包安装问题

设置go代理

echo "export GOPROXY=https://goproxy.cn" >> ~/.profile && source ~/.profile

下载github的package替代golang.org的package

git clone --depth=1 https://github.com/golang/text.git $GOPATH/src/golang.org/x

git clone --depth=1 https://github.com/golang/crypto.git $GOPATH/src/golang.org/x/crypto

git clone --depth=1  https://github.com/golang/net.git $GOPATH/src/golang.org/x/net

git clone --depth=1  https://github.com/golang/sys.git $GOPATH/src/golang.org/x/sys

git clone --depth=1  https://github.com/golang/tools.git $GOPATH/src/golang.org/x/tools

go get -u github.com/qiniu/x/log

相关推荐