Set GOPATH, GOPROXY and add $GOPATH/bin to $PATH. e.g.:
You need to set
GOPROXY=directif using a network that blocks proxy.golang.org, otherwise you can skip that envvar.
echo "export GOPATH=$HOME/work/go >> ~/.profile
echo "export GOPROXY=direct" >> ~/.profile
echo "export PATH=$GOPATH/bin:$PATH >> ~/.profileInstall dependencies
sudo apt update
sudo apt install make protobuf-compilermkdir -p $HOME/work
cd $HOME/work
git clone git@github.com:marcoshack/twirp-example.git
cd twirp-examplego mod download
go install github.com/twitchtv/twirp/protoc-gen-twirp@latest
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
go install golang.org/x/lint/golint@latestmake