Live data from Hacker News

Air – Live reload when developing with Go

github.com

1–10 of 46 posts

Re: Air – Live reload when developing with Go

#6
post #5

When writing go, I've always found if I find myself constantly restarting & recompiling a program during development, it means that I should be writing tests instead.

Yep it’s actually one of the things i love. If waiting for go compile time has gotten to be a problem it is time for tests or to refactor if a test can’t be easily written.

Re: Air – Live reload when developing with Go

#8
I built something like this in Go a few years ago but it reloads your infrastructure when it changes, recompiles your code when it needs to, and syncs static files or interpreted files to wherever your app is running (desktop or cloud). Think of it like docker-compose but with file watching + sync + smart rebuilds. https://skaffold.dev/

Re: Air – Live reload when developing with Go

#9
post #4

http://eradman.com/entrproject/ find . -name "*.go" | entr -r go run my/main/file.go

That can’t handle file creation after the command is run, though, right?

I'm not sure about "find" -- but I also use "entr" for this (and just about a billion other tasks, is there anything you can't use it for?) and I personally do something like:

  ls src/**/*.filetype | entr -r -s "some command"
And this will catch new files

Re: Air – Live reload when developing with Go

#10
post #8

I built something like this in Go a few years ago but it reloads your infrastructure when it changes, recompiles your code when it needs to, and syncs static files or interpreted files to wherever your app is running (desktop or cloud). Think of it like docker-compose but with file watching + sync + smart rebuilds. https://skaffold.dev/

You're the author of Skaffold? Damn that's impressive
Post reply on HN