• Stars
    star
    354
  • Rank 120,042 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.

gobrew

Go version manager, written in Go
Update and switch Go versions easily
Install Go on Linux or Mac (intel) or Mac with Apple chip (M1, M2 etc) or Windows

Quick Setup: One command to install Go and manage versions.

Hassle Free: Doesn't require root or sudo, or shell re-hash.

Platform: Supports (arm64, arch64, Mac, Mac M1, Ubuntu and Windows).

Flexible: Manage multiple Go versions including beta and rc.

Colorful: Colorful output.

Build Status

CI coverage build-time go-binary-size unit-test-run-time allocs-per-op

go-mod-dependencies go-sec-issues

coverage build-time go-binary-size go-mod-dependencies go-sec-issues unit-test-run-time allocs-per-op

Install or update

Step 1

Using curl (mac, linux) - recommended

curl -sL https://raw.githubusercontent.com/kevincobain2000/gobrew/master/git.io.sh | sh

Using powershell (windows)

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/kevincobain2000/gobrew/master/git.io.ps1'))

Using go

go install github.com/kevincobain2000/gobrew/cmd/gobrew@latest

Step 2

Now add PATH setting your shell config file (.bashrc or .zshrc).

export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"

All DONE!

Execute gobrew command from any dir.

gobrew

Quick Usage

Simply use command gobrew from any dir. It will auto detect if Go version is set, or not latest, or not same as go.mod file.

gobrew command

Full Usage

Smart command

gobrew

Specific commands

Will install and set Go

gobrew use 1.16

Will automatically install and set Go

gobrew use mod #from go.mod
gobrew use latest #latest stable
gobrew use dev-latest #latest of latest including rc|beta

Will only install it

gobrew install 1.16
gobrew use 1.16

Uninstall a version

gobrew uninstall 1.16

List installed versions

╰─$ gobrew ls
1.15.1
1.16
1.16.3
1.17
1.17.1
1.17.2
1.17.3
1.17.4
1.17.5
1.17.6
1.17.7
1.17.8
1.18
1.18.1
1.18beta1
1.18rc1
1.22.0*
1.22rc1
1.22rc2

current: 1.20.0

List available versions

╰─$ gobrew ls-remote
==> [Info] Fetching remote versions
1.5	1.5.0  1.5.1  1.5.2  1.5.3  1.5.4
	1.5beta1  1.5beta2  1.5beta3  1.5rc1

1.6	1.6.0  1.6.1  1.6.2  1.6.3  1.6.4
	1.6beta1  1.6beta2  1.6rc1  1.6rc2

1.7	1.7.0  1.7.1  1.7.2  1.7.3  1.7.4
	1.7.5  1.7.6
	1.7beta1  1.7beta2  1.7rc1  1.7rc2  1.7rc3  1.7rc4
	1.7rc5  1.7rc6

1.8	1.8.0  1.8.1  1.8.2  1.8.3  1.8.4
	1.8.5  1.8.6  1.8.7
	1.8beta1  1.8beta2  1.8rc1  1.8rc2  1.8rc3  1.8.5rc4
	1.8.5rc5

1.9	1.9.0  1.9.1  1.9.2  1.9.3  1.9.4
	1.9.5  1.9.6  1.9.7
	1.9beta1  1.9beta2  1.9rc1  1.9rc2

1.10	1.10.0  1.10.1  1.10.2  1.10.3  1.10.4
	1.10.5  1.10.6  1.10.7  1.10.8
	1.10beta1  1.10beta2  1.10rc1  1.10rc2

1.11	1.11.0  1.11.1  1.11.2  1.11.3  1.11.4
	1.11.5  1.11.6  1.11.7  1.11.8  1.11.9  1.11.10
	1.11.11  1.11.12  1.11.13
	1.11beta1  1.11beta2  1.11beta3  1.11rc1  1.11rc2

1.12	1.12.0  1.12.1  1.12.2  1.12.3  1.12.4
	1.12.5  1.12.6  1.12.7  1.12.8  1.12.9  1.12.10
	1.12.11  1.12.12  1.12.13  1.12.14  1.12.15  1.12.16
	1.12.17
	1.12beta1  1.12beta2  1.12rc1

1.13	1.13.0  1.13.1  1.13.2  1.13.3  1.13.4
	1.13.5  1.13.6  1.13.7  1.13.8  1.13.9  1.13.10
	1.13.11  1.13.12  1.13.13  1.13.14  1.13.15
	1.13beta1  1.13rc1  1.13rc2

1.14	1.14.0  1.14.1  1.14.2  1.14.3  1.14.4
	1.14.5  1.14.6  1.14.7  1.14.8  1.14.9  1.14.10
	1.14.11  1.14.12  1.14.13  1.14.14  1.14.15
	1.14beta1  1.14rc1

1.15	1.15.0  1.15.1  1.15.2  1.15.3  1.15.4
	1.15.5  1.15.6  1.15.7  1.15.8  1.15.9  1.15.10
	1.15.11  1.15.12  1.15.13  1.15.14  1.15.15
	1.15beta1  1.15rc1  1.15rc2

1.16	1.16.0  1.16.1  1.16.2  1.16.3  1.16.4
	1.16.5  1.16.6  1.16.7  1.16.8  1.16.9  1.16.10
	1.16.11  1.16.12  1.16.13  1.16.14  1.16.15
	1.16beta1  1.16rc1

1.17	1.17.0  1.17.1  1.17.2  1.17.3  1.17.4
	1.17.5  1.17.6  1.17.7  1.17.8  1.17.9  1.17.10
	1.17.11  1.17.12  1.17.13
	1.17beta1  1.17rc1  1.17rc2

1.18	1.18.0  1.18.1  1.18.2  1.18.3  1.18.4
	1.18.5  1.18.6  1.18.7  1.18.8  1.18.9  1.18.10
	1.18beta1  1.18beta2  1.18rc1

1.19	1.19.0  1.19.1  1.19.2  1.19.3  1.19.4
	1.19.5  1.19.6  1.19.7  1.19.8  1.19.9  1.19.10
	1.19.11  1.19.12  1.19.13
	1.19beta1  1.19rc1  1.19rc2

1.20	1.20.0  1.20.1  1.20.2  1.20.3  1.20.4
	1.20.5  1.20.6  1.20.7  1.20.8  1.20.9  1.20.10
	1.20.11  1.20.12  1.20.13  1.20.14
	1.20rc1  1.20rc2  1.20rc3

1.21	1.21.0  1.21.1  1.21.2  1.21.3  1.21.4
	1.21.5  1.21.6  1.21.7
	1.21rc1  1.21rc2  1.21rc3  1.21rc4

1.22	1.22.0
	1.22rc1  1.22rc2

All commands

╰─$ gobrew help

gobrew 1.10.7

Usage:

    gobrew use <version>           Install and set <version>
    gobrew ls                      Alias for list
    gobrew ls-remote               List remote versions (including rc|beta versions)

    gobrew install <version>       Only install <version> (binary from official or GOBREW_REGISTRY env)
    gobrew uninstall <version>     Uninstall <version>
    gobrew list                    List installed versions
    gobrew self-update             Self update this tool
    gobrew prune                   Uninstall all go versions except current version
    gobrew version                 Show gobrew version
    gobrew help                    Show this message

Examples:
    gobrew use 1.16                # use go version 1.16
    gobrew use 1.16.1              # use go version 1.16.1
    gobrew use 1.16rc1             # use go version 1.16rc1

    gobrew use 1.16@latest         # use go version latest of 1.16

    gobrew use 1.16@dev-latest     # use go version latest of 1.16, including rc and beta
                                   # Note: rc and beta become no longer latest upon major release

    gobrew use mod                 # use go version listed in the go.mod file
    gobrew use latest              # use go version latest available
    gobrew use dev-latest          # use go version latest avalable, including rc and beta

Installation Path:

# Add gobrew to your ~/.bashrc or ~/.zshrc
export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"
export GOROOT="$HOME/.gobrew/current/go"

Uninstall gobrew

rm -rf $HOME/.gobrew

Use it in Github Actions

For more details: https://github.com/kevincobain2000/action-gobrew

on: [push]
name: CI
jobs:
  test:
    strategy:
      matrix:
        go-version: [1.13, 1.18, 1.18@latest, 1.19beta1, 1.19@dev-latest, latest, dev-latest, mod]
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - uses: kevincobain2000/action-gobrew@v2
        with:
          version: ${{ matrix.go-version }}

      - name: Go
        run: go version

Using Bash completions

curl https://raw.githubusercontent.com/kevincobain2000/gobrew/master/completions/bash/gobrew-completion > /usr/local/etc/bash_completion.d/gobrew

# or
curl https://raw.githubusercontent.com/kevincobain2000/gobrew/master/completions/bash/gobrew-completion >> ~/.zshrc

# or
curl https://raw.githubusercontent.com/kevincobain2000/gobrew/master/completions/bash/gobrew-completion >> ~/.bashrc

Customization

By default, gobrew is installed in $HOME as $HOME/.gobrew.

You can change this by setting the GOBREW_ROOT environment variable.

# optionally set
echo "export GOBREW_ROOT=/usr/local/share" >> ~/.bashrc
# optionally set
echo "export GOBREW_ROOT=/usr/local/share" >> ~/.zshrc


#then
curl -sLk https://raw.githubusercontent.com/kevincobain2000/gobrew/master/git.io.sh | sh

Set GOROOT and GOPATH in your shell config file (.bashrc or .zshrc).

# optionally set
export GOROOT="$HOME/.gobrew/current/go"
# optionally set
export GOPATH="$HOME/.gobrew/current/go"

Change Log

  • v1.2.0 - Added rc|beta versions, appended at the end of list
  • v1.4.1 - Go mod updated to 1.17
  • v1.5.0 - Mac M1 support
  • v1.5.1 - Oops
  • v1.5.5 - arm|M1|darwin support added
  • v1.5.6 - README updated
  • v1.5.7 - Exit code fixed
  • v1.5.8 - Show download progress and use Go's compression instead of tar command
  • v1.5.9 - oops
  • v1.6.0 - Added support for @latest and @dev-latest and progress bar for download
  • v1.6.1 - Bug on use
  • v1.6.2 - Using goreleaser #35 by @juev
  • v1.6.3 - Added latest and dev-latest
  • v1.6.4 - Github action publish
  • v1.6.7 - Fixes rate limit issue
  • v1.6.9 - Fixes #52, download error on status != 200
  • v1.7.4 - Added 2 new options gobrew version and gobrew prune
  • v1.7.5 - Fixes strange output on gobrew use latest
  • v1.7.7 - Windows support?
  • v1.7.8 - Windows support, self-update fixes
  • v1.7.9 - Windows fix ups and bash-completions
  • v1.8.0 - Windows support, including actions
  • v1.8.2 - Prune old go versions, bug fix and go.mod auto detection
  • v1.8.4 - Light background terminal support
  • v1.8.6 - Fixes where 1.20.0 was detected as 1.20
  • v1.9.0 - v1.8.6 ~ v1.9.0, updates colors packages, fixes UT issues for Github status codes
  • v1.9.1 - Minor logging fixes
  • v1.9.2 - Minor log message updated
  • v1.9.4 - gobrew interactive
  • v1.9.5 - bug
  • v1.9.8 - bug fix where 1.21 is not detected as 1.21.0
  • v1.10.0 - bug fixes for wrong gobrew version on windows
  • v1.10.6 - fix for powershell
  • v1.10.7 - fixes where dev-latest was not from rc or beta. go get -u deps updated and use go 1.22 in go.mod

More Repositories

1

sentiment_classifier

Sentiment Classification using Word Sense Disambiguation
OpenEdge ABL
171
star
2

jProcessing

Japanese Natural Langauge Processing Libraries
OpenEdge ABL
148
star
3

laravel-erd

Automatically generate ERD Diagrams from Model's relations in Laravel
PHP
128
star
4

ionic-animated-modal

When animate css and ionic modal meet
JavaScript
122
star
5

ionic-tinder-ui

Just a Tinder UI on Ionic
JavaScript
94
star
6

ionic-photo-browser

When F7 and ionic meet
JavaScript
75
star
7

ionic-animated-popup

When animate css and ionic POPUP meet
JavaScript
51
star
8

ionic-timeline

Ionic Timeline - Can use either Images or Icons for your timeline thingy
JavaScript
48
star
9

email_extractor

Yes it works! Email Extractor by Full Url Crawl. Extract emails and web urls from a website with full crawl or option depth of urls to crawl using terminal and python.
Python
48
star
10

UIViewAnimations-Demo

UIView Animations. Move up, down, rotate, zoom, scale bounce etc in a uiview, uilabel, uibutton etc,
Objective-C
41
star
11

ionic-parallax-profile

Parallax Profile with ionic, A profile header with slides and a like Button
JavaScript
37
star
12

instagram-bot-api

Instagram Bot using Nodejs and instagram api
CSS
34
star
13

json-to-html-table

Convert Nested JSON to HTML Table β€” React, Javascript.
CSS
30
star
14

listof

list of anything (Community driven list of anything) text :)
Ruby
27
star
15

laravel-alert-notifications

Send alert to email, microsoft teams from laravel app, when an exception occurs. Throttle is enabled by default.
PHP
26
star
16

cache-http

action/cache temporary alternative to get dependency cache on GHES for self-hosted runners
Go
17
star
17

action-cache-http

Action for caching dependencies on Github Enterprise via HTTP. Useful for self hosted runners
Shell
15
star
18

node-flickr

npm module for flickr api
JavaScript
14
star
19

Bayes

Bayesian Classification in Objective-C
Objective-C
8
star
20

go-app-reviews-scraper

Apple app store reviews and ratings scraper.
Go
8
star
21

re

Command Line Tool to execute commands in README.md file.
Go
8
star
22

golang-cheat-sheet

Go Lang cheat sheet. Easy searchable tool for features and syntax for go language.
TypeScript
8
star
23

instagram-autolike-script

JavaScript
7
star
24

subtitle_translator

subtitles translator, srt subtitles translate from English to Many Langauges including Japanese, Chinese etc from terminal.
JavaScript
7
star
25

tumblr-autolike-script

JS - Autolike 1000 photos a day while browsing tumblr from Chrome
JavaScript
6
star
26

framework7-rails

Gem for Framework7 which is a Full Featured HTML Framework For Building iOS Apps
Ruby
5
star
27

node-sentiwordnet

JavaScript
5
star
28

ionic-toast-notification

If your ionic app wants to show preview of notifications
JavaScript
5
star
29

email-extractor-online

Extract urls and email addresses by crawling website. Online Tool.
Vue
4
star
30

action-camo-purge

Github Action to purge githubusercontent camo cache. Purge shield badges and images cache from README.md
4
star
31

go-msteams

Go
4
star
32

japan-drivers-license-practice-test-questions-english

Japanese drivers license practice test questions in English
TypeScript
4
star
33

latex-writer

Online latex writer in the web browser
HTML
3
star
34

ionic-market-hack

How to get the source code for apps on the ionic-market that have android demo
3
star
35

node-edict

Python
3
star
36

instachart

Generate charts as images using API. Embed dynamic charts as images in Github Markdown.
Go
3
star
37

kevincobain2000.github.io

https://kevincobain2000.github.io
Astro
2
star
38

MemeGenerator

MEME GENERATOR using PHP MVC - Ethna + Design on bootstrap
PHP
2
star
39

sentiments

gem install sentiments
Ruby
2
star
40

sentiwordnet

Ruby
2
star
41

action-gobrew

Setup Go in Github Actions using Gobrew
2
star
42

web_sentiments

Extract data from web to perform sentiment analysis
Python
2
star
43

software-engineering-laws

2
star
44

medium-code-highlight

medium-code-highlight tool
CSS
2
star
45

go-glassdoor-scraper

Scrape Glassdoor reviews in Go to JSON. Glassdoor reviews API.
Go
2
star
46

HandGestureRecognition

hand gesture recognition using HSV from Videos & Images
C#
2
star
47

google-cloud-icons

Simple react app with ssr and csr with next.js for searching Google Cloud Icons
JavaScript
2
star
48

outlook-roomfinder

Find Meeting Rooms Automatically - Outlook Roomfinder
JavaScript
2
star
49

action-coveritup

All in One Code Coverage, bundle size, and other reports tracking tool. Self hosted codecov solution.
Go
2
star
50

Emergency-Git-working-V1

Objective-C
1
star
51

allergy-assassin-iphone

Objective-C
1
star
52

kevincobain2000

1
star
53

Quiz

Quiz Game iOS for Beginner
Objective-C
1
star
54

vagrant-django-mysql-ssl

Basic Setup, Rename myproject -> yourprojectname
Python
1
star
55

puzzle48

iPhone App
Objective-C
1
star
56

meme-generator-facebook

MEME GENERATOR using PHP and Post the resulting image to Facebook
PHP
1
star
57

dotfiles

Emacs Lisp
1
star
58

go-gibberish

Gibberish text detector in Go. Detect if a sentence is meaning full or just jumbled words.
Go
1
star
59

certgen

Generate SSL certs for GRPC and HTTPS using openssl
Shell
1
star
60

ionic-api

Sorry, Nothing to opensource here..just using raw.githubusercontent for app apis
CSS
1
star
61

ionic-notifications

When You someone sends you a message!
JavaScript
1
star
62

prime_algorithms

prime number algorithms python
Python
1
star
63

action-scc

Sloc, Cloc and Code Action to update README.md with code stats.
Go
1
star
64

vuepress-theme-monokai

Yet another vuepress simple theme with enhanced side bar, font face
CSS
1
star
65

Slide48

Objective-C
1
star
66

socket-express-chat

A simple BBS app using socket.io, express (ejs). Shows number of connected clients and broadcasts the message
CSS
1
star
67

python-socket-chat

python-socket-chat telnet chat with socket and vagrant /rooms and /private message
Python
1
star
68

clickjackable

Tells if a url is clickjackable or not. Please note that it only checks for the X-FRAME-OPTIONS
Ruby
1
star
69

ethna-english-doc

Ethna English Documentation PHP
JavaScript
1
star
70

ionic-timeline-v3

ionic-timeline-v3
TypeScript
1
star
71

friends

JavaScript
1
star
72

letterfx

gem for jquery-letterfx. For demo see: http://tuxsudo.com/code/project/letterfx
Ruby
1
star
73

idealform-typeahead

IdealForms with Typeahead
JavaScript
1
star
74

gfycat

A PHP interface to the Gfycat API. for laravel and other frameworks
PHP
1
star
75

pinterest-autolike-script

does what it says in title
JavaScript
1
star
76

miller-rabin-primality-test-online

Miller Rabin Primality Test Online - big integers - Javascript Implementation webtool
Vue
1
star
77

mysql-vs-postgresql

https://medium.com/web-developer/mysql-vs-postgresql-performance-test-with-laravel-api-for-simple-eloquent-queries-on-1-million-6e0e6f1005b8
PHP
1
star