- go get慢
vim /etc/hosts
192.30.253.112 github.com
151.101.185.194 github.global.ssl.fastly.net
- package golang.org/x/sync/errgroup: unrecognized import path "golang.org/x/sync/errgroup"
前提: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
网友评论