2020-12-24 10:02:04 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
DIR=$(dirname "$(readlink -f "$0")")
|
|
|
|
. "$DIR/../env.sh"
|
|
|
|
|
|
|
|
log "Setting up go"
|
|
|
|
# install go
|
|
|
|
case "$PM" in
|
|
|
|
apt)
|
|
|
|
sudo apt install -y \
|
|
|
|
golang
|
|
|
|
;;
|
|
|
|
pacman)
|
|
|
|
sudo pacman -S --noconfirm --needed \
|
|
|
|
go
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if in_china; then
|
|
|
|
go env -w GO111MODULE=on
|
2021-03-02 02:52:31 +00:00
|
|
|
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/
|
2020-12-24 10:02:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# coc.nvim
|
|
|
|
if enhance_vim; then
|
|
|
|
v -c "CocInstall -sync coc-go|qall"
|
|
|
|
fi
|