First install the go language compilation environment in CentOS, download the go language archive from the official website and put it in the usr/locao directory, then use the command:
tar -C /usr/local/go -zxvf /usr/local/go1.17.6.linux-amd64.tar.gz
Extract to /usr/local/go
after that configure the environment variables and create three folders in go.
export GOPATH=/home/go
mkdir -p /home/go/{src,bin,pkg}
Check the go version
go version
Using the same method, you can install the go language compilation environment on ECS:
After that, install the gin framework, which is a web framework written in Golang and has the advantage of high performance
Set up the goproxy.io proxy
go env -w GOPROXY=https