go 相关常用命令(updateing)

 

# Go 下载
https://golang.org/dl/

 

 

# Go 安装
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
vim /etc/profile
export PATH=$PATH:/usr/local/go/bin

 

# go 提速

vim    ~/.bashrc 或 ~/.bash_profile

 

# 启用 Go Modules 功能
export GO111MODULE=on
# 配置 GOPROXY 环境变量
export GOPROXY=https://goproxy.io

https://goproxy.io/zh/

 

# 设置GO的环境变量
Edit your ~/.bash_profile to add the following line:
export GOPATH=$HOME/go
Save and exit your editor. Then, source your ~/.bash_profile.
source ~/.bash_profile

 

posted @ 2019-07-08 17:45  Cong0ks  阅读(1394)  评论(0)    收藏  举报