All Projects → hit9 → Oo

hit9 / Oo

Licence: mit
Simple Go Version Manager.

Programming Languages

shell
77523 projects
golang
3204 projects

Projects that are alternatives of or similar to Oo

govm
Govm is a fast and flexible Go version manager built with Go.
Stars: ✭ 17 (-77.92%)
Mutual labels:  version-manager
Cpm.cmake
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
Stars: ✭ 560 (+627.27%)
Mutual labels:  version-manager
Goenv
🚙 Like pyenv and rbenv, but for Go.
Stars: ✭ 964 (+1151.95%)
Mutual labels:  version-manager
flora
Upgrade and version manager for terraform
Stars: ✭ 16 (-79.22%)
Mutual labels:  version-manager
G
Simple go version manager, gluten-free
Stars: ✭ 307 (+298.7%)
Mutual labels:  version-manager
Php Version
stupid simple PHP version management
Stars: ✭ 637 (+727.27%)
Mutual labels:  version-manager
unity-version-manager
A commandline application to manage unity versions
Stars: ✭ 18 (-76.62%)
Mutual labels:  version-manager
Terraenv
Terraform & Terragrunt Version Manager
Stars: ✭ 72 (-6.49%)
Mutual labels:  version-manager
Asdf Plugins
Central plugin repository for asdf
Stars: ✭ 350 (+354.55%)
Mutual labels:  version-manager
Nhversion
NHVersion for version your api
Stars: ✭ 13 (-83.12%)
Mutual labels:  version-manager
dvm
A lightweight, and powerful Deno Version Manager for Linux/macOS.
Stars: ✭ 21 (-72.73%)
Mutual labels:  version-manager
G
Golang Version Manager
Stars: ✭ 285 (+270.13%)
Mutual labels:  version-manager
Snm
🤏 Smol Node Manager written in Rust
Stars: ✭ 24 (-68.83%)
Mutual labels:  version-manager
snowfs
SnowFS - a fast, scalable version control file storage for graphic files 🎨
Stars: ✭ 1,101 (+1329.87%)
Mutual labels:  version-manager
Dvm
Fast and simple Deno runtime version manager written in OCaml
Stars: ✭ 58 (-24.68%)
Mutual labels:  version-manager
godot-hub
A hub for your Godot needs
Stars: ✭ 17 (-77.92%)
Mutual labels:  version-manager
Snowfs
SnowFS - a fast, scalable version control file storage for graphic files 🎨
Stars: ✭ 590 (+666.23%)
Mutual labels:  version-manager
Installer
dmd installers for various systems
Stars: ✭ 74 (-3.9%)
Mutual labels:  version-manager
Jdk switcher
A yet another Ubuntu/Debian-specific tool that makes switching between multiple JDK versions a one liner
Stars: ✭ 69 (-10.39%)
Mutual labels:  version-manager
Asdf Ocaml
OCaml plugin for ASDF version manager
Stars: ✭ 13 (-83.12%)
Mutual labels:  version-manager

OO - Go Version Manager

Latest version: 0.0.7

oo was heavily inspired by tj/n.

Requirements

Supported system:

  • Mac OSX
  • Linux

Requirements:

  • Bash
  • Curl

Install

  1. Clone this repo.

  2. Add this to your bashrc or zshrc:

    source "/path/to/oo/env"
    

Note that you need to set GOPATH manually in your bashrc or zshrc:

export GOPATH=/path/to/your/gopath
export PATH=$PATH:$GOPATH/bin

Examples

Get go1.12.6 installed:

$ oo get 1.12.6

Then, the go1.12.6 is ready:

$ go version
go version go1.12.6 darwin/amd64

Use go1.12.6 as current go (or just oo 1.12.6):

$ oo use 1.12.6
=> go1.12.6

Run go from 1.12.6 temporary:

$ oo as 1.12.6 version
go version go1.12.6 darwin/amd64
$ oo as 1.12.6 run helloworld.go
Hello world!

List all installed go versions

$ oo ls
   1.12.5
=> 1.12.6

Build (or rebuild) go by version:

$ oo build 1.12.6
build go1.12.6..
build successfully

Get current go binary path:

$ oo bin
/Users/hit9/github/oo/go/bin/go

Remove a version:

$ oo rm 1.12.5                                                                                                                                                                          1 ↵ (go1.4 [email protected]) ~/github/oo/versions/1.5/src
[email protected] removed

Using Prebuilt

By default, oo prefers to bootstrap a new version via an existing installed version:

$ oo get 1.12.6
get https://codeload.github.com/golang/go/tar.gz/go1.12.6..
######################################################################## 100.0%
using go1.12.5 to bootstrap go1.12.6....
build successfully
=> go1.12.6

But we are still able to download a prebuilt packages directly from https://golang.org/dl/ without a build waiting:

$ oo get 1.10.3 --use-prebuilt
get https://dl.google.com/go/go1.10.3.darwin-amd64.tar.gz..
######################################################################## 100.0%
=> go1.10.3

Usage

Usage: oo [COMMAND]

Commands:
  oo                         Output current go version
  oo ls                      Output versions installed
  oo <version>               Use go <version>
  oo use <version>           Use go <version>
  oo get <version>           Get go <version>
  oo rm <version>            Remove the given version
  oo as <version>            Run go from oo on a specific version
  oo dir [<version>]         Show go directory by version
  oo bin [<version>]         Show go binary path by version
  oo build [<version>]       Build go by version
  oo env                     Output current go env
  oo upgrade                 Upgrade oo to latest version

Options:
  -v, --version              Output oo's version
  -h, --help                 Output this help message

Environment Variables:
  OO_MIRROR_PATTERN          Mirror url pattern to download go source tarball
                             default: https://codeload.github.com/golang/go/tar.gz/go%s
  OO_BUILD_CMD               Command to build go from source, default: ./make.bash
  OO_BOOTSTRAP_VERSION       Bootstrap go version to compile the target version,
                             default: the latest installed version

Version: 0.0.7

Custom Mirror

$ export OO_MIRROR_PATTERN='https://storage.googleapis.com/golang/go%s.src.tar.gz'
$ oo get 1.12.6
get https://storage.googleapis.com/golang/go1.12.6.src.tar.gz..
##########                                                                14.4%

Similar Projects

Troubles

If there are any errors during the bootstrap building, it's helpful to build manually to check what errors occurred:

cd path/to/oo/versions/x.x.x/src
GOROOT_BOOTSTRAP=path/to/downloaded/go ./all.bash

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].