Skip to content

Instantly share code, notes, and snippets.

@icholy
Last active December 16, 2015 20:59
Show Gist options
  • Save icholy/5496231 to your computer and use it in GitHub Desktop.
Save icholy/5496231 to your computer and use it in GitHub Desktop.
gow can be used in place of go and will re-run the command every time a *.go file is modified.
# watch/re-run go command
# Demo http://ascii.io/a/3049
gow () {
while true; do
clear
echo "go $@"
go "$@"
if [ $? -eq 0 ]; then break; fi
inotifywait -e modify *.go 2> /dev/null
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment