Skip to content

Instantly share code, notes, and snippets.

@icholy
Created April 16, 2013 14:31
Show Gist options
  • Save icholy/5396374 to your computer and use it in GitHub Desktop.
Save icholy/5396374 to your computer and use it in GitHub Desktop.
golang watch/recompile
# watch/recompile go
function gowatch () {
echo
echo "Watching files in $(pwd)"
echo
ls | grep ".go$" | while read go_file; do
echo " - $go_file"
done
echo
while true; do
inotifywait -e modify *.go;
go build
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment