Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (22 loc) · 526 Bytes

Golang.md

File metadata and controls

30 lines (22 loc) · 526 Bytes

Golang 安装

使用Brew

brew install golang

从二进制文件安装

cd ~
wget https://mirrors.ustc.edu.cn/golang/go1.17.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile

GOPATH 设置

echo "export PATH=\$PATH:\$HOME/go/bin" >> ~/.profile

使用goproxy代理依赖

go env -w GOPROXY=https://goproxy.cn,direct