markbates / pkger

Embed static files in Go binaries (replacement for gobuffalo/packr)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pkger + fswatch issue

AlexandreBernard opened this issue · comments

I am using fswatch to live reload our go code on docker development machines using this principle :

https://levelup.gitconnected.com/how-to-live-reload-code-for-golang-and-docker-without-third-parties-ee90721ef641

fswatch -or --event=Updated ./my-project | xargs -n1 -I{} <cmd>

I'm trying to add Pkger to the process in order to trigger pkger before every re-compilation before live reload occurs

I've excluded pkged.go from fswatch watched files and only listens to Update events of course. But no matter what I do it ends up recompiling endlessly

I've also came to the conclusion that when I run the command manually it triggers two recompilations while the pkged output file is still ignored

Any idea why such thing is happening? Does Pkger touches some file meta information maybe? In any case that's not something I would expect