Alaya源码编译之go的升级

alaya源码编译要求go1.13+,ubuntu默认安装的1.10,,需要先卸载旧版本:
sudo rm -rf /usr/local/go && sudo rm -rf /usr/bin/go
然后安装新版本:
wget https://dl.google.com/go/go1.15.3.linux-amd64.tar.gz &&
sudo tar -xzf go1.15.3.linux-amd64.tar.gz -C /usr/local &&
sudo ln -s /usr/local/go/bin/ /usr/bin/ &&
mkdir -p $HOME/go-workspace/src $HOME/go-workspace/pkg $HOME/go-workspace/bin &&
echo ‘export GOROOT=/usr/local/go’ >> $HOME/.bashrc && echo ‘export GOPATH=$HOME/go-workspace’ >> $HOME/.bashrc && echo ‘export PATH=$PATH:$GOROOT/bin:$GOPATH/bin’ >> $HOME/.bashrc &&
source $HOME/.bashrc

然后就可以愉快的玩耍了。