Hogere versie Go

This commit is contained in:
2025-11-24 11:21:57 +00:00
parent 99f17d0a36
commit cf544b1f2f

View File

@@ -1,16 +1,28 @@
#!/bin/bash
apt update
echo "";
echo "===================================";
echo "Install golang-go...";
echo "===================================";
apt-get -y install golang-go;
if [ $? == 0 ] ; then
echo 'golang-go installed'
else
echo 'ERROR: Installing golang-go NOT succesfull!'
exit
fi
set -e
GO_VERSION=1.22.5 # of een andere recente 1.22.x / 1.23.x
echo "==================================="
echo "Installeren van Go ${GO_VERSION}..."
echo "==================================="
apt-get update
apt-get -y install curl ca-certificates
cd /tmp
curl -LO https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
# Oude Go-installatie weghalen (indien aanwezig)
rm -rf /usr/local/go
# Nieuwe Go installeren
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
# Go in PATH zetten voor dit script
export PATH=/usr/local/go/bin:$PATH
go version # zou nu go1.22.x moeten tonen
#apt-get -y install golang-go;
#if [ $? == 0 ] ; then
# echo 'golang-go installed'
#else
# echo 'ERROR: Installing golang-go NOT succesfull!'
# exit
#fi
echo "";
echo "===================================";
echo "Installing mailhog...";