-
-
Save wweir/78ea25df5f0d9b6a9e2acc7ab031efee to your computer and use it in GitHub Desktop.
利用 goproxy 加速安装 gopls 之类命令行工具,并保持开发环境整洁
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
god(){ | |
mkdir -p /tmp/god | |
(cd /tmp/god && go mod init god &> /dev/null) | |
for repo in $@; do | |
(cd /tmp/god && GOPROXY=${GOPROXY:-https://goproxy.cn,direct} go get $repo) | |
done | |
} | |
god $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment