コマンド体系に破壊的な仕様変更があった
今まであったgoinstallや6gや8gはなくなって、主にgoというコマンドに集約されてる。
最新版をいれる
$ hg clone -u weekly https://go.googlecode.com/hg/ go
$ cd go
$ cd src
$ cd ./all.bash
...
$ export PATH=$PATH:~/go/bin
$ which go
/Users/mzi/go/bin/go
ハローワールド
hello.go
package main
import "fmt"
func main(){
fmt.Printf("Hello, world\n")
}
スクリプト言語のように実行する。
$ go run hello.go
Hello, world
プロジェクトで実行したい場合は go buildなどを使う。あとで書く。