Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Go Auto-Recompile and Reload Server on file change

Tags:

I know AppEngine does this, but I'm not coding for it.

I tried using Guard from Ruby world, to listen on changes on .go files, and execute the following commands:

killall foo
go build -race
./foo &

But it never sends foo into background, it just hangs indefinitely.

How are you guys solving this problem? Solution has to be cross-platform too (GNU/Linux and Mac).

like image 266
if __name__ is None Avatar asked Oct 26 '13 09:10

if __name__ is None


1 Answers

A friend wrote a simple Compile Daemon for go, worked like a charm for my own small net/http-projects.

You can find the repository here: https://github.com/githubnemo/CompileDaemon

like image 128
krizz Avatar answered Oct 08 '22 07:10

krizz