{"id":28469505,"url":"https://github.com/btassone/goverman","last_synced_at":"2026-03-13T10:31:59.384Z","repository":{"id":296079955,"uuid":"992240860","full_name":"btassone/goverman","owner":"btassone","description":"Goverman is a Go version management tool that helps developers who need to work with multiple Go (Golang) versions","archived":false,"fork":false,"pushed_at":"2025-09-05T03:14:50.000Z","size":2035,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T01:30:39.367Z","etag":null,"topics":["almalinux","alpine","fedora","gentoo","go","go-installer","go-version-manager","kali","linux","macos","opensuse","ubuntu","versioning","windows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/btassone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-28T20:56:13.000Z","updated_at":"2025-09-05T03:13:58.000Z","dependencies_parsed_at":"2025-05-28T22:25:44.873Z","dependency_job_id":"cbe5d3cb-efcd-40a8-9303-3800829d0644","html_url":"https://github.com/btassone/goverman","commit_stats":null,"previous_names":["btassone/goverman"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/btassone/goverman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btassone%2Fgoverman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btassone%2Fgoverman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btassone%2Fgoverman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btassone%2Fgoverman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btassone","download_url":"https://codeload.github.com/btassone/goverman/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btassone%2Fgoverman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30465420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T06:34:02.089Z","status":"ssl_error","status_checked_at":"2026-03-13T06:33:49.182Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["almalinux","alpine","fedora","gentoo","go","go-installer","go-version-manager","kali","linux","macos","opensuse","ubuntu","versioning","windows"],"created_at":"2025-06-07T09:00:42.121Z","updated_at":"2026-03-13T10:31:59.358Z","avatar_url":"https://github.com/btassone.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![goverman banner](banner_short.png)\n\n# goverman (Go Version Manager)\n\n[![Test Go Scripts](https://github.com/btassone/goverman/actions/workflows/test.yml/badge.svg)](https://github.com/btassone/goverman/actions/workflows/test.yml)\n[![Go Versions](https://img.shields.io/badge/Go-1.17%2B-blue.svg)](https://go.dev/dl/)\n[![Platforms](https://img.shields.io/badge/platforms-linux%20%7C%20macos%20%7C%20windows-brightgreen.svg)](https://github.com/btassone/goverman#supported-platforms)\n[![License](https://img.shields.io/badge/license-GPL--3.0-orange.svg)](LICENSE)\n\n**goverman** is a simple and powerful Go version manager that allows you to install and manage multiple Go versions on your system. Unlike other version managers, goverman provides a unified tool called `gman` to easily install, uninstall, and switch between different Go versions without affecting your system's default Go installation.\n\n## Quick Install\n\nInstall goverman with a single command:\n\nUsing curl:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/btassone/goverman/main/install.sh | bash\n```\n\nUsing wget:\n```bash\nwget -qO- https://raw.githubusercontent.com/btassone/goverman/main/install.sh | bash\n```\n\nThis will:\n- Install `gman`, `gman-update`, and `gman-uninstall` to `/usr/local/bin`\n- Set up your PATH automatically\n- Install the man page (if available)\n\n## Updating\n\nUpdate gman to the latest version:\n\n```bash\ngman-update\n```\n\nThis will:\n- Check for the latest version\n- Download and install updates for gman and companion scripts\n- Create a backup of the current version\n- Preserve your existing Go installations\n\n## Uninstalling\n\nThe uninstaller provides flexible options for removal:\n\n```bash\n# Interactive mode - asks what to do with Go versions\ngman-uninstall\n\n# Remove everything (gman and all Go versions)\ngman-uninstall --remove-all\n\n# Keep only the default Go version\ngman-uninstall --keep-default\n\n# Keep all Go versions (only remove gman)\ngman-uninstall --keep-all\n```\n\nOptions:\n- **Interactive mode** (default): Asks whether to remove all Go versions, keep only default, or keep all\n- **--remove-all**: Remove gman and all gman-installed Go versions\n- **--keep-default**: Remove gman and non-default Go versions\n- **--keep-all**: Remove only gman, keeping all Go versions for manual use\n\nThe uninstaller will:\n- Remove gman and companion scripts (gman-update, gman-uninstall)\n- Remove the man page\n- Handle Go versions based on your choice\n- Clean up PATH entries from shell profiles (unless keeping Go versions)\n- Create backups of modified shell profiles\n\n## Why goverman?\n\nWhile tools like `gvm` (Go Version Manager) exist, many are no longer actively maintained. goverman fills this gap with:\n\n- **Active maintenance** - Regular updates and bug fixes\n- **Bootstrap capability** - Install Go on fresh systems without requiring Go\n- **Modern Go support** - Always supports the latest Go releases\n- **Simple interface** - One tool (`gman`) for all operations\n- **CI/CD friendly** - Extensively tested across 12+ OS configurations\n- **No dependencies** - Pure bash implementation, works everywhere bash does\n\n## Overview\n\nGoverman is a Go version management tool that helps developers who need to work with multiple Go (Golang) versions by:\n- **Bootstrapping Go** on fresh systems without requiring an existing Go installation\n- Installing specific Go SDK versions alongside your default Golang installation\n- Managing multiple Go compiler versions without conflicts\n- Providing easy Go version switching capabilities for different projects\n- Supporting multiple architectures (amd64, arm64, armv6l) across Linux, macOS, and Windows\n- Offering both official (`go install`) and direct download installation methods\n- **Bulk uninstalling** all goverman-managed Go versions with one command\n- Handling broken Go installations gracefully with automatic recovery\n\n## Features\n\n### 🚀 Bootstrap Installation\nInstall Go on fresh systems without any prerequisites:\n```bash\ngman bootstrap          # Latest stable version\ngman bootstrap latest   # Explicitly latest version\ngman bootstrap 1.23.9   # Specific version\n```\n\n### 📦 Multiple Installation Methods\n- **Official**: Uses `go install` (requires existing Go)\n- **Direct**: Downloads binaries from go.dev (works without Go)\n\n### 🔄 Version Management\n- Install multiple versions side-by-side\n- Switch between versions easily\n- Set any version as the default `go` command\n- List all installed versions with status indicators\n\n### 🗑️ Clean Uninstallation\n- Remove individual versions: `gman uninstall 1.23.9`\n- Remove all versions at once: `gman uninstall-all`\n\n### 🌍 Cross-Platform Support\n- Linux (12+ distributions tested)\n- macOS (Intel \u0026 Apple Silicon)\n- Windows (via Git Bash/WSL)\n- Multiple architectures: amd64, arm64, armv6l\n\n### 🛡️ Robust Error Handling\n- Handles broken Go installations gracefully\n- Detects and warns about PATH conflicts\n- Automatic fallback from official to direct method\n\n### 🔄 Easy Updates\n- One-command update: `gman-update`\n- Updates all components (gman, gman-update, gman-uninstall)\n- Automatic backup before updates\n- Preserves all your Go installations\n\n## Prerequisites\n\n- Bash-compatible shell (bash, zsh, fish, etc.)\n- curl or wget (required for downloading Go)\n- Standard UNIX tools (tar, grep, sed)\n- Go 1.17+ (only for the `install` command; not needed for `bootstrap`)\n\n## Installation\n\n### Recommended: Quick Install\n\nUse the install script (recommended):\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/btassone/goverman/main/install.sh | bash\n```\n\n### Manual Installation\n\nClone this repository:\n\n```bash\ngit clone https://github.com/btassone/goverman.git\ncd goverman\nchmod +x gman gman-update gman-uninstall\n```\n\nAdd to your PATH:\n```bash\nsudo ln -s $(pwd)/gman /usr/local/bin/gman\nsudo ln -s $(pwd)/gman-update /usr/local/bin/gman-update\nsudo ln -s $(pwd)/gman-uninstall /usr/local/bin/gman-uninstall\n# Or add the goverman directory to your PATH\n```\n\n## Shell Support\n\nGoverman automatically detects your shell and adds the Go binary path to the appropriate configuration file:\n\n- **Bash**: Updates `~/.bashrc` or `~/.bash_profile`\n- **Zsh**: Updates `~/.zshrc` or `~/.zprofile`\n- **Fish**: Updates `~/.config/fish/config.fish`\n- **Other shells**: Falls back to `~/.profile`\n\nThe installer will:\n1. Detect your default shell from the `$SHELL` environment variable\n2. Show which shell was detected\n3. Prompt you to add the PATH to the correct profile file\n4. Provide instructions to apply changes immediately\n\n## Usage\n\nThe `gman` tool provides all functionality through a single command:\n\n```bash\ngman \u003ccommand\u003e [options]\n```\n\n### Commands\n\n#### Bootstrap Go (For Fresh Systems)\n\nIf you don't have Go installed yet, use the bootstrap command to install Go without any prerequisites:\n\n```bash\n# Install the latest stable Go version\ngman bootstrap\n\n# Explicitly install latest Go version\ngman bootstrap latest\n\n# Install a specific Go version\ngman bootstrap 1.23.9\n```\n\nThe bootstrap command:\n- Downloads Go directly from the official website\n- Installs to `/usr/local/go` (may require sudo)\n- Automatically configures your PATH\n- Works on systems without any Go installation\n\n#### Installing a Go Version\n\nThe install command supports two installation methods:\n\n**Official Method (default)** - Uses `go install` to download and install Go versions:\n```bash\ngman install 1.23.9      # Specific version\ngman install latest      # Latest stable version\n```\n\n**Direct Method** - Downloads Go binaries directly from the official Go website:\n```bash\ngman install 1.23.9 direct\n```\n\n**Install and Set as Default** - Install a version and set it as the default `go` command:\n```bash\ngman install 1.23.9 --default\n```\n\n#### Uninstalling Go Versions\n\nRemove a specific Go version:\n```bash\ngman uninstall 1.23.9\n```\n\nRemove all goverman-installed Go versions:\n```bash\ngman uninstall-all\n```\n\nThe `uninstall-all` command will:\n- Find all Go versions installed by gman\n- Prompt for confirmation before removing\n- Clean up orphaned SDK directories\n- Remove the default symlink if present\n\n#### List Installed Versions\n\nView all Go versions installed by goverman:\n```bash\ngman list\n```\n\n#### List Available Versions\n\nView available Go versions that can be installed:\n```bash\n# Show recent versions (top 20)\ngman list-available\n\n# Show all available versions\ngman list-available --all\n```\n\n#### Set Default Version\n\nSet an installed version as the default `go` command:\n```bash\ngman set-default 1.23.9\n```\n\n\n#### Help\n\nShow usage information:\n```bash\ngman help\n```\n\n### Quick Command Reference\n\n```bash\n# Bootstrap (for fresh systems without Go)\ngman bootstrap                  # Install latest stable Go\ngman bootstrap latest           # Explicitly install latest Go\ngman bootstrap 1.23.9           # Install specific version\n\n# Install additional Go versions\ngman install latest             # Install latest stable version\ngman install latest --default   # Install latest and set as default\ngman install 1.23.9             # Official method (requires Go)\ngman install 1.23.9 direct      # Direct download method\ngman install 1.23.9 --default   # Install and set as default\n\n# Manage versions\ngman list                       # List installed versions\ngman list-available             # List available versions\ngman set-default 1.23.9         # Set default go command\ngman uninstall 1.23.9           # Remove a version\ngman uninstall-all              # Remove all versions\n\n# Other\ngman version                    # Show gman version\ngman help                       # Show help\n```\n\n### Using Installed Go Versions\n\nAfter installation, versioned binaries are available in your PATH:\n\n```bash\n# Use a specific version\ngo1.23.9 version\n\n# Run go commands with a specific version\ngo1.23.9 build ./...\ngo1.23.9 test ./...\n```\n\n### Testing gman\n\nRun the automated test suite to verify gman works correctly:\n\n```bash\n./test-go-scripts.sh\n```\n\nThe test suite includes:\n- `test-go-scripts.sh` - Main installation and functionality tests\n- `test-path-setup.sh` - PATH configuration tests\n- `test-list-available.sh` - Version listing tests\n- `test-distro-detection.sh` - Linux distribution detection tests\n- `test-alpine-detection.sh` - Alpine/musl libc detection tests\n- `test-bootstrap.sh` - Bootstrap command functionality tests\n- `test-uninstall-all.sh` - Bulk uninstall functionality tests\n\nThese tests verify:\n- Bootstrap installation on fresh systems\n- Both installation methods (official and direct)\n- Correct version installation\n- Reinstallation scenarios\n- Set-default functionality\n- Distribution detection accuracy\n- Bulk uninstall operations\n- Handling of broken Go installations\n- Clean up test installations\n\n## How It Works\n\n1. **gman**: A unified tool that combines all functionality:\n   - **bootstrap**: Installs Go on fresh systems without requiring existing Go\n     - Downloads directly from go.dev\n     - Installs to `/usr/local/go`\n     - Configures PATH automatically\n   - **install**: Creates versioned Go binaries (e.g., `go1.23.9`)\n     - Installs to `$GOBIN` or `$GOPATH/bin`\n     - Sets up PATH if needed\n     - Supports multiple architectures automatically\n     - Can optionally set the installed version as default\n   - **uninstall**: Removes the versioned binary and cleans up the associated GOROOT directory\n   - **uninstall-all**: Removes all goverman-managed Go versions at once\n   - **list**: Shows all installed Go versions and identifies the default\n   - **set-default**: Creates a symlink to use a specific version as the default `go` command\n   - **help**: Shows usage information\n\n2. **test-go-scripts.sh**:\n   - Automated testing of gman functionality\n   - Tests install/uninstall operations\n   - Verifies set-default functionality\n   - Ensures gman works correctly across different scenarios\n\n## Supported Platforms\n\n### Operating Systems\n\n- **Linux**\n  - Standard distributions (Ubuntu, Debian, Fedora, etc.)\n  - Enterprise distributions (AlmaLinux, CentOS, RHEL, Rocky Linux)\n  - SUSE-based distributions (openSUSE Leap, openSUSE Tumbleweed, SLES)\n  - Arch-based distributions (Arch Linux, Manjaro, EndeavourOS)\n  - Source-based distributions (Gentoo, Funtoo)\n  - Independent distributions (Slackware)\n  - Alpine Linux (musl libc) - with limitations*\n- **macOS**\n  - macOS 12 (Monterey) and later\n  - Both Intel and Apple Silicon\n- **Windows**\n  - Windows 10/11 via Git Bash or WSL\n  - Windows Server 2019 and later\n\n### Architectures\n\n- **amd64** (x86_64) - Intel/AMD 64-bit processors\n- **arm64** (aarch64) - ARM 64-bit processors (Apple Silicon, AWS Graviton, etc.)\n- **armv6l** - ARM 32-bit processors (Raspberry Pi, etc.)\n\n### Distribution Detection\n\nGoverman automatically detects your Linux distribution and displays it during installation. This helps with:\n- Diagnosing compatibility issues\n- Providing distribution-specific recommendations\n- Better support and troubleshooting\n\nDetected distributions include: Ubuntu, Debian, Fedora, AlmaLinux, CentOS, RHEL, Rocky Linux, openSUSE, SLES, Arch Linux, Gentoo, Alpine, Slackware, and more.\n\n### Notes on Alpine Linux Support\n\nAlpine Linux uses musl libc instead of glibc, which can affect Go binary compatibility:\n- Official Go binaries from go.dev are built for glibc and may have limited compatibility\n- For best results on Alpine, consider using Alpine's package manager: `apk add go`\n- The direct installation method may work better than the official method\n- Some older Go versions may not work at all due to libc differences\n\n## Testing\n\nGoverman has comprehensive test coverage across multiple platforms:\n- Automated CI/CD tests run on every push and pull request\n- Tests complete in ~2 minutes for most platforms\n- Tests run on 12+ different OS configurations including:\n  - Ubuntu (latest, 22.04)\n  - macOS (latest, 13)\n  - Windows (latest via Git Bash)\n  - Alpine Linux (musl libc)\n  - AlmaLinux 8 \u0026 9\n  - openSUSE Leap \u0026 Tumbleweed\n  - Arch Linux\n  - Gentoo\n  - Slackware\n- All tests run in parallel with `fail-fast: false` for complete results\n- Run tests locally with any of the test scripts listed above\n\n## Contributing\n\nPull requests are welcome! Please ensure all tests pass by running `./test-go-scripts.sh` before submitting.\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtassone%2Fgoverman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtassone%2Fgoverman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtassone%2Fgoverman/lists"}