Skip to content

Instantly share code, notes, and snippets.

@giwa
Created January 24, 2015 00:34
Show Gist options
  • Save giwa/8870c62e990a6cea9455 to your computer and use it in GitHub Desktop.
Save giwa/8870c62e990a6cea9455 to your computer and use it in GitHub Desktop.
brew update
brew install go
export GOROOT=/usr/local/opt/go/libexec
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
package main
import "fmt"
func main() {
fmt.Println("hello world")
}
$ go run hello-world.go
hello world
$ go build hello-world.go
$ ls
hello-world hello-world.go
$./hello-world
hello world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment