Skip to content

Commit

Permalink
feat(install-go): Add var to control Go version
Browse files Browse the repository at this point in the history
And Update Go version to 1.21.8
  • Loading branch information
oliveiraleo committed Sep 27, 2024
1 parent 3608691 commit 46885fa
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions install-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

echo "Welcome to the Go installer script"

# Control variables
GO_LANG_VERSION=1.21.8

##############
# Install Go #
##############
echo "[INFO] Installing Go"
echo "[INFO] Installing Go $GO_LANG_VERSION"
echo "[INFO] Downloading the package from source"
# Install Go 1.21.6
wget -nc https://dl.google.com/go/go1.21.6.linux-amd64.tar.gz
# Install Go
wget -nc https://dl.google.com/go/go$GO_LANG_VERSION.linux-amd64.tar.gz
echo "[INFO] Extracting and installing package contents"
sudo tar -C /usr/local -zxf go1.21.6.linux-amd64.tar.gz
sudo tar -C /usr/local -zxf go$GO_LANG_VERSION.linux-amd64.tar.gz
echo "[INFO] Updating envitonment vars"
mkdir -p ~/go/{bin,pkg,src}
echo 'export GOPATH=$HOME/go' >> ~/.bashrc
Expand Down

0 comments on commit 46885fa

Please sign in to comment.