go get慢解决方案

2019-08-06  本文已影响0人  把爱放下会走更远
    vim /etc/hosts
    192.30.253.112 github.com
    151.101.185.194 github.global.ssl.fastly.net
前提:gopath和goroot配置好
export GOROOT=/usr/local/go
export GOPATH=/root/go
export PATH=$PATH:$GOROOT/bin

然后:
mkdir -p $GOPATH/src/golang.org/x
cd $GOPATH/src/golang.org/x
git clone https://github.com/golang/net.git
git clone https://github.com/golang/sync.git
上一篇下一篇

猜你喜欢

热点阅读