Skip to content

Enable your Go applications to self update

License

Notifications You must be signed in to change notification settings

AhMyth/go-selfupdate

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-selfupdate

GoDoc Build Status

Enable your Golang applications to self update. Inspired by Chrome based on Heroku's hk.

Features

  • 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

QuickStart

Install library and update/patch creation utility

go get -u github.com/sanbornm/go-selfupdate/...

Enable your App to Self Update

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()
}

About

Enable your Go applications to self update

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 86.7%
  • Shell 12.7%
  • HTML 0.6%