この記事を読んでPython2.7からgoに変換する「grumpy」というツールを試してみたくなった。
...と思ったら、手元のMacにgoの実行環境がなかったので、HomeBrewを使ってサクッとインストールした。
$ brew install go ==> Downloading https://homebrew.bintray.com/bottles/go-1.7.4_1.el_capitan.bottle.tar.gz ######################################################################## 100.0% ==> Pouring go-1.7.4_1.el_capitan.bottle.tar.gz ==> Caveats As of go 1.2, a valid GOPATH is required to use the `go get` command: https://golang.org/doc/code.html#GOPATH You may wish to add the GOROOT-based install location to your PATH: export PATH=$PATH:/usr/local/opt/go/libexec/bin ==> Summary /usr/local/Cellar/go/1.7.4_1: 6,438 files, 250.7M $ go version go version go1.7.4 darwin/amd64
できた。
試しにバージョンを出力させてみたが問題なかった。
普段だとenv系を入れてバージョン管理したりするが、今のところgoをそこまで扱う欲求がない。
というわけで、今回はHomeBrew直接インストールで妥協した。