4. #1 シンプル
// go
for i, f := range files {
fmt.Printf(“files[%i] = %s”, i, f)
}
// sh
for ((i = 0; i < ${#files[*]}; i++)) do
echo “files[$i] = ${files[$i]}”
done
5. #2 高速
$ time heroku help > /dev/null
… 0.402 total
$ time hk help > /dev/null
… 0.014 total # 28x speed!
6. #3 配布が楽
$ mkdir hello && cd $_
$ vi main.go
# git add, commit, push to GitHub
$ go get github.com/naoty/hello
$ hello
Hello, world!
11. naoty/ext
$ go get github.com/naoty/ext
$ go get github.com/naoty/gem-uninstall-
all
$ alias gem=“ext gem”
$ gem uninstall all
# Run `gem-uninstall-all`
13. naoty/todo
$ go get github.com/naoty/todo
$ todo add Learn Golang
$ todo add Write a small script
$ todo list
[ ] 001: Learn Golang
[ ] 002: Write a small script
$ todo done 1
$ todo list
[x] 001: Learn Golang
[ ] 002: Write a small script