Hiya Gophers -
https://github.com/inconshreveable/go-update is a cross-platform package that allows you to build Go programs which can update themselves to new versions from the internet or anywhere else. This is the package I use to implement the auto-updating functionality for ngrok.
go-update supports:
- Binary patch application
- Checksum validation with a pluggable hash function
- Cryptographic signature verification with pluggable crypto functions (ecdsa and rsa out of the box)
- Windows!
There are a lot more details in the documentation:
This package was originally released ~2 years ago, but I’m rereleasing it now with a new, redesigned API that incorporates lessons learned in API design and the problem domain itself.
For those of you looking for a complete updating solution with all the server bits and integration with your build process to do the code signing and such, we’re building out
https://equinox.io for this. If that’s interesting to you, just drop us your email address:
https://equinox.io/auth/signup or contact me personally. I’ll also send out another post to the list when it’s ready for public consumption.
Enjoy!
- alan