
Package update provides functionality to implement secure, self-updating Go programs (or other single-file targets) A program can update itself by replacing its executable file with a new version.
It provides the flexibility to implement different updating user experiences like auto-updating, or manual user-initiated updates. It also boasts advanced features like binary patching and code signing verification.
Example of updating from a URL:
import (
"fmt"
"net/http"
"github.com/inconshreveable/go-update"
)
func doUpdate(url string) error {
resp, err := http.Get(url)
if err != nil {
return err
}
defer resp.Body.Close()
err := update.Apply(resp.Body, update.Options{})
if err != nil {
// error handling
}
return err
}
equinox.io is a complete ready-to-go updating solution built on top of go-update that provides:
The master branch of go-update is not guaranteed to have a stable API over time. For any production application, you should vendor
your dependency on go-update with a tool like git submodules, gb or govendor.
The go-update package makes the following promises about API compatibility:
go-update will strive for as few API-breaking changes as possible.Options struct passed to Apply was changed to be passed by value instead of passed by pointer. Old API at 28de026.221d034 or gopkg.in/inconshreveable/go-update.v0.Apache
(top 24 of 32)
356 followers · starred Apr 2016
9,083 followers · starred May 2014
1,069 followers · starred Nov 2015
2,062 followers · starred May 2014

Package update provides functionality to implement secure, self-updating Go programs (or other single-file targets) A program can update itself by replacing its executable file with a new version.
It provides the flexibility to implement different updating user experiences like auto-updating, or manual user-initiated updates. It also boasts advanced features like binary patching and code signing verification.
Example of updating from a URL:
import (
"fmt"
"net/http"
"github.com/inconshreveable/go-update"
)
func doUpdate(url string) error {
resp, err := http.Get(url)
if err != nil {
return err
}
defer resp.Body.Close()
err := update.Apply(resp.Body, update.Options{})
if err != nil {
// error handling
}
return err
}
equinox.io is a complete ready-to-go updating solution built on top of go-update that provides:
The master branch of go-update is not guaranteed to have a stable API over time. For any production application, you should vendor
your dependency on go-update with a tool like git submodules, gb or govendor.
The go-update package makes the following promises about API compatibility:
go-update will strive for as few API-breaking changes as possible.Options struct passed to Apply was changed to be passed by value instead of passed by pointer. Old API at 28de026.221d034 or gopkg.in/inconshreveable/go-update.v0.Apache
(top 24 of 32)
356 followers · starred Apr 2016
9,083 followers · starred May 2014
1,069 followers · starred Nov 2015
2,062 followers · starred May 2014