- Jump right in with Go 1.9 and Ubuntu 16.04 (Xenial).
- Slim as possible – only the minimal software.
- Provides you with a workspace according to recommended practice.
- The workspace is at
$HOME/go
, the default for Go. - The
./go
directory on your machine maps to$HOME/go
on the guest OS.
- The workspace is at
- Install a supported Vagrant provider such as VirtualBox, HyperV, Docker, or VMware.
- Download and install Vagrant.
- Clone or download this project to a folder on your machine.
- Start and connect to the virtual machine:
$ vagrant up
$ vagrant ssh
$ go get github.com/golang/example/hello
$ hello
Hello, Go examples!
github.com/user
is a universally-unique path of your choosing.
package-name
is the name of your new program.
$ mkdir $GOPATH/src/[github.com/user]/[package-name]
... create your .go file(s) in the new directory ...
$ go install github.com/user/[package-name]
$ [package-name]