#!/bin/bash

rm -rf go1.21.6.linux-amd64.tar.gz
wget http://10.250.0.100:9000/octopus/go1.21.6.linux-amd64.tar.gz -O go1.21.6.linux-amd64.tar.gz

rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
sed -i "$ a export PATH=\$PATH:/usr/local/go/bin" /root/.bashrc
source /root/.bashrc

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