github.com/sagernet/sing-box@v1.9.0-rc.20/release/local/install_go.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  set -e -o pipefail
     4  
     5  go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
     6  curl -Lo go.tar.gz "https://go.dev/dl/go$go_version.linux-amd64.tar.gz"
     7  sudo rm -rf /usr/local/go
     8  sudo tar -C /usr/local -xzf go.tar.gz
     9  rm go.tar.gz