brew install go
mkdir $HOME/go
cd !$
#!/bin/bash
export GOPATH=$(pwd)
export PATH=$PATH:/usr/local/opt/go/libexec/bin:$GOPATH
source ./setenv.sh
go version
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
mkdir src/go
cd !$
vim hello.go
go build
./hello
go get golang.org/x/tour/gotour
# in $GOPATH/bin
gotour