Script for local installation of Go and golangci-lint without root privileges.
go/
├── update.sh # installation script
├── bin/ # symlinks to binaries (add to $PATH)
└── version/ # downloaded archives and extracted versions
./update.shThe script:
- Detects OS and architecture
- Downloads the Go archive for the specified version (if not already downloaded)
- Extracts to
version/<VERSION>/ - Creates symlinks in
bin/ - Installs golangci-lint (if not present)
export PATH="$HOME/go/bin:$PATH"Edit VERSION at the top of update.sh and re-run the script.
- curl
- tar
- sh / bash / zsh
- Linux (x86_64, arm64) or macOS (x86_64, arm64)
Скрипт для локального встановлення Go та golangci-lint без прав суперкористувача.
go/
├── update.sh # скрипт встановлення
├── bin/ # симлінки на бінарники (додати до $PATH)
└── version/ # завантажені архіви та розпаковані версії
./update.shСкрипт:
- Визначає ОС та архітектуру
- Завантажує архів Go вказаної версії (якщо ще не завантажений)
- Розпаковує в
version/<VERSION>/ - Створює симлінки в
bin/ - Встановлює golangci-lint (якщо відсутній)
export PATH="$HOME/go/bin:$PATH"Відредагувати VERSION на початку update.sh та перезапустити скрипт.
- curl
- tar
- sh / bash / zsh
- Linux (x86_64, arm64) або macOS (x86_64, arm64)