Restarting a Go app on code change

Jul 13, 2020 21:45 · 46 words · 1 minute read

Solution: Use the entr program. On a macOS with Homebrew, it can be easily installed with brew install entr. Then, you can run a command like that:

1
ls *.go | entr -r go run .

Note: For solving the “unable to stat” problem, see https://github.com/eradman/entr/issues/36