I’m working on a Go CLI app: https://github.com/Zimzozaur/don and I want it to be self-updatable from within the app itself.
Specifically, I want the update command in my main.go (line 32: https://github.com/Zimzozaur/don/blob/024e35a6011844b0cca348dbf1d6160acd7f6104/main.go#L32) to:
- Easily download the latest version of the app
- Replace the existing binary so I can run the newest version immediately
I’m also a bit confused about publishing Go apps in general. How do people usually make a CLI available for anyone to install and update easily?
What’s the simplest way to do this in Go? Ideally I’d like to avoid creating tags or releases if possible.