How to setup a Go Watcher that can execute custom scripts or `go run main.go` etc. Latest changes will be saved and pushed live. This can be used for hot/live reloading, normal code, docker images creation etc. Demonstrated on a simple hello world program. Skip ahead if needed! :)
0:00 - Download Watcher
0:20 - Create Program/Project
1:10 - Start Watcher
1:22 - Example watch files
1:50 - Advanced example / custom script
Go Watcher: https://github.com/radovskyb/watcher
See github repo for more examples/details.
Commands:
watcher -cmd="go run main.go"
watcher -dotfiles=false -recursive=true -cmd="go run main.go" main.go .
Can execute any script instead of go run main go. Just replace for your desired program.
-cmd="./myscript"
🎵 Track Info:
Title: Summertime by Tokyo Music Walker
––––––––––––––––––––––––––––––
Summertime by Tokyo Music Walker / user-356546060
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream: https://bit.ly/al-summertime
Music promoted by Audio Library • Summertime – Tokyo Music Walker (No Copyri...
––––––––––––––––––––––––––––––