github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/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