admin 4 weeks ago

Tentukan versi Go terbaru

#!/bin/bash


# Tentukan versi Go terbaru

GO_VERSION="1.22.3"

GO_TAR="go${GO_VERSION}.linux-amd64.tar.gz"

GO_URL="https://go.dev/dl/${GO_TAR}"


# Unduh dan ekstrak Go

wget ${GO_URL}

sudo rm -rf /usr/local/go

sudo tar -C /usr/local -xzf ${GO_TAR}


# Bersihkan file arsip

rm ${GO_TAR}


# Tambahkan Go ke PATH (jika belum ada)

PROFILE_FILE="$HOME/.bashrc"

if ! grep -q "/usr/local/go/bin" "$PROFILE_FILE"; then

 echo 'export PATH=$PATH:/usr/local/go/bin' >> "$PROFILE_FILE"

fi


# Terapkan perubahan PATH

source "$PROFILE_FILE"


# Buat workspace Go

mkdir -p ~/go/{bin,pkg,src}


# Tambahkan pengaturan workspace ke environment

if ! grep -q "export GOPATH=" "$PROFILE_FILE"; then

 echo 'export GOPATH=$HOME/go' >> "$PROFILE_FILE"

 echo 'export PATH=$PATH:$GOPATH/bin' >> "$PROFILE_FILE"

fi


# Terapkan perubahan GOPATH

source "$PROFILE_FILE"


# Verifikasi instalasi

echo "✅ Go version:"

go version


echo "📁 Workspace dibuat di: ~/go"

echo "✅ Instalasi dan konfigurasi selesai!"


Installing Plugin JWT and Activate

Installing Plugin JWT and Activate

1743468932.jpg
zdgtl
9 months ago
Time Ago to Date Format Converter

Time Ago to Date Format Converter

1743468932.jpg
zdgtl
10 months ago
Video Thumbnail Generator

Video Thumbnail Generator

1743468932.jpg
zdgtl
10 months ago
Menghilangkan Spasi Di depan Baris

Menghilangkan Spasi Di depan Baris

1743468932.jpg
zdgtl
9 months ago
Mass Users Password Reset for wordpress

Mass Users Password Reset for wordpress

1743468932.jpg
zdgtl
10 months ago