[ANN] go-update: build self-updating Golang programs

943 views
Skip to first unread message

Alan Shreve

unread,
Aug 19, 2015, 11:40:27 AM8/19/15
to golang-nuts
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

Carlos Castillo

unread,
Aug 19, 2015, 1:39:11 PM8/19/15
to golang-nuts
How does one create a binary diff for use with the built-in BSDiffPatcher?

The package which provides the algorithm is internal to go-update so I can't write a tool myself to do the job, perhaps you should provide one with the package or make the library not internal.

Thorsten Sommer

unread,
Aug 19, 2015, 4:32:59 PM8/19/15
to golang-nuts
Dear Alan,

thank you for this nice package :) This is a great idea. Keep that good work.


Regards,
Thorsten

Alan Shreve

unread,
Aug 19, 2015, 6:43:34 PM8/19/15
to Carlos Castillo, golang-nuts
There are a number of ways to do that, but the easiest will probably be just to use the `bsdiff` tool, which you can get via the usual ways: brew install bsdiff, apt-get install bsdiff.

More information on that is here:

Or programmatically in Go using the library that go-update is vendoring: https://github.com/kr/binarydist

- alan

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages