Painless bootstrapping of GOlang. It downloads and installs GO for your OS and architecture, sets GOROOT, GOPATH and runs default shell or your command.
Usage of gobu:
usage: gobu [<flags>] <command> [<args> ...]
Bootstrap your golang environment
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--debug Verbose mode.
--version Show application version.
Commands:
help [<command>...]
Show help.
shell* [<flags>]
Start a shell with Golang environment.
versions
List of all supported Golang releases.
You can find compiled binaries for your platform under "Releases" or if you prefer quick install:
$ curl -L https://github.com/dz0ny/gobu/releases/download/v0.8.0/gobu-`uname -s`-`uname -m` > /usr/local/bin/gobu
$ chmod +x /usr/local/bin/gobu
$ mkdir -p project/src/hello_world
$ cd project
$ gobu shell --version=1.9.3 or 1.10rc1
2016/08/25 09:55:52 >> You are now in a new GOBU shell. To exit, type 'exit'
2016/08/25 09:55:52 GOPATH /home/dz0ny/project
2016/08/25 09:55:52 GOROOT /home/dz0ny/.gobu/1.7/go
$ nano src/hello_world/main.go
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
$ go build hello_world
$ tree
.
├── hello_world
└── src
└── hello_world
└── main.go
Downloads latest version from releases and runs it in shell. After the GO is bootstrapped you will end up in shell with "Vendoring" enabled and with fresh env set up for you.
Because I hate setting environment every time for every project(not library).