Last Updated: February 25, 2016
·
989
· rubyphunk

Autotesting Go

If you're like me and you love, want, need to run your tests after a file has changed automatically (autotest) and you want to quickly recognize whats going on (Notification) without switching shells all the time; this oneliner is for you.

kicker -ce "go test 3>&1 1>&2 2>&3 | terminal-notifier" ./

It requires Mac 10.8 and higher, Kicker and terminal-notifier, the latter coming as Ruby gems.

gem install kicker terminal-notifier

The weird pipe setup actually just switches stdout and stderr so the Notification center just receives a nice ok/fail message and the actual content (i.e. the error description) gets flushed into the shell.