linux部署go多版本工具g

安装 cd mkdir ~/.g cat << "EOF" | tee ~/.g/env #!/bin/sh # g shell setup export GOROOT="${HOME}/.g/go" export PATH="${HOME}/.g/bin:${GOROOT}/bin:$PATH" export G_MIRROR=https://golang.google.cn/dl/ EOF cat << "EOF" | tee -a ~/.bashrc # g shell setup if [ -f "${HOME}/.g/env" ]; then . "${HOME}/.g/env" fi EOF exec bash # download g wget -c https://mirror.ghproxy.com/https://github.com/voidint/g/releases/download/v1.6.0/g1.6.0.linux-amd64.tar.gz mkdir ~/.g/bin # unzip…

Continue Reading