linux

下载安装

wget https://studygolang.com/dl/golang/go1.13.4.linux-amd64.tar.gz
sudo tar zxvf go1.13.4.linux-amd64.tar.gz -C /usr/local

配置

sudo mkdir -p $HOME/{src,bin,pkg}
cat >> ~/.bash_profile <<EOF
# Enable the go modules feature
export GO111MODULE=on
# Set the GOPROXY environment variable
export GOPROXY=https://goproxy.cn
export GOROOT=/usr/local/go
export GOPATH=$HOME
export PATH=\$PATH:\$GOROOT/bin
EOF

. ~/.bash_profile
Copyright © weiliang 2021 all right reserved,powered by Gitbook本书发布时间: 2024-04-22 16:03:42

results matching ""

    No results matching ""