Enable your Golang applications to self update. Inspired by Chrome based on Heroku's hk.
- Tested on Mac, Linux, Arm, and Windows
- Creates binary diffs with bsdiff allowing small incremental updates
- Falls back to full binary update if diff fails to match SHA
go get -u github.com/sanbornm/go-selfupdate/...
var updater = &selfupdate.Updater{
CurrentVersion: version,
ApiURL: "http://updates.yourdomain.com/",
BinURL: "http://updates.yourdomain.com/",
DiffURL: "http://updates.yourdomain.com/",
LocalStateDir: "update/",
AppName: "myApp",
DirName: "cli", // direcroty name
}
if updater != nil {
go updater.BackgroundRun()
}