A shell script that may be combined with fswatch on Mac OS X to watch a golang project for changes. Upon changes, the program is stopped, compiled and restarted
fswatch /your/go/src/dir/to/watch "gohawk.sh yourcmd"
Example assumes both fswatch and gowatch.sh are in the PATH. This example does the following:
fswatchwatches/your/go/src/dir/to/watchdirectory for any changes e.g. file saves- Upon detecting changes,
fswatchinvokes thegohawk.sh yourcmd gohawk.shin-turn stops, installs, runs and tests theyourcmd
Inspired by gowatcher for Linux.