Install Golang using Gobrew

rusydy

Rusydy

Posted on January 10, 2023

Install Golang using Gobrew

The Go version manager’s name is gobrew, which is inspired by nodebrew.

Install gobrew



curl -sLk https://git.io/gobrew | sh -

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

export GOROOT="$HOME/.gobrew/current/go"


Enter fullscreen mode Exit fullscreen mode

to make sure it installed properly:



which go


Enter fullscreen mode Exit fullscreen mode

it should return something like:



/Users/username/.gobrew/current/bin/go


Enter fullscreen mode Exit fullscreen mode

If it returns something else, then try to copy the second and third line into ~/zshrc. Don't forget to source ~/.zshrc.

Install Go



gobrew install 1.19.5 


Enter fullscreen mode Exit fullscreen mode

Set Go version



gobrew use 1.19.5


Enter fullscreen mode Exit fullscreen mode

Uninstall Go



gobrew uninstall 1.19.5


Enter fullscreen mode Exit fullscreen mode

List installed Go versions



gobrew ls


Enter fullscreen mode Exit fullscreen mode

List available Go versions



gobrew ls-remote


Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
rusydy
Rusydy

Posted on January 10, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Basic Syntax in Go
beginners Basic Syntax in Go

January 12, 2023

Install Golang using Gobrew
beginners Install Golang using Gobrew

January 10, 2023