Air – Live reload when developing with Go
1–10 of 46 posts
Re: Air – Live reload when developing with Go
#2Re: Air – Live reload when developing with Go
#3Unlike other languages with insane build and link times, I've never needed this for Go. Builds are nearly instantaneous.
Re: Air – Live reload when developing with Go
#4 find . -name "*.go" | entr -r go run my/main/file.goRe: Air – Live reload when developing with Go
#5Re: Air – Live reload when developing with Go
#6When 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.
Re: Air – Live reload when developing with Go
#7http://eradman.com/entrproject/ find . -name "*.go" | entr -r go run my/main/file.go
Re: Air – Live reload when developing with Go
#8Re: Air – Live reload when developing with Go
#9http://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?
ls src/**/*.filetype | entr -r -s "some command"
And this will catch new filesRe: Air – Live reload when developing with Go
#10I 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/