• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

internal/H12-Jan-2016-1,4231,141

LICENSEH A D12-Jan-2016551 1410

README.mdH A D12-Jan-20162.3 KiB6651

apply.goH A D12-Jan-20169.1 KiB323196

apply_test.goH A D12-Jan-201611.2 KiB401336

doc.goH A D12-Jan-20165.1 KiB1731

hide_noop.goH A D12-Jan-201685 84

hide_windows.goH A D12-Jan-2016348 2015

patcher.goH A D12-Jan-2016662 2515

verifier.goH A D12-Jan-20162.1 KiB7562

README.md

1# go-update: Build self-updating Go programs [![godoc reference](https://godoc.org/github.com/inconshreveable/go-update?status.png)](https://godoc.org/github.com/inconshreveable/go-update)
2
3Package update provides functionality to implement secure, self-updating Go programs (or other single-file targets)
4A program can update itself by replacing its executable file with a new version.
5
6It provides the flexibility to implement different updating user experiences
7like auto-updating, or manual user-initiated updates. It also boasts
8advanced features like binary patching and code signing verification.
9
10Example of updating from a URL:
11
12```go
13import (
14    "fmt"
15    "net/http"
16
17    "github.com/inconshreveable/go-update"
18)
19
20func doUpdate(url string) error {
21    resp, err := http.Get(url)
22    if err != nil {
23        return err
24    }
25    defer resp.Body.Close()
26    err := update.Apply(resp.Body, update.Options{})
27    if err != nil {
28        // error handling
29    }
30    return err
31}
32```
33
34## Features
35
36- Cross platform support (Windows too!)
37- Binary patch application
38- Checksum verification
39- Code signing verification
40- Support for updating arbitrary files
41
42## [equinox.io](https://equinox.io)
43[equinox.io](https://equinox.io) is a complete ready-to-go updating solution built on top of go-update that provides:
44
45- Hosted updates
46- Update channels (stable, beta, nightly, ...)
47- Dynamically computed binary diffs
48- Automatic key generation and code
49- Release tooling with proper code signing
50- Update/download metrics
51
52## API Compatibility Promises
53The master branch of `go-update` is *not* guaranteed to have a stable API over time. For any production application, you should vendor
54your dependency on `go-update` with a tool like git submodules, [gb](http://getgb.io/) or [govendor](https://github.com/kardianos/govendor).
55
56The `go-update` package makes the following promises about API compatibility:
571. A list of all API-breaking changes will be documented in this README.
581. `go-update` will strive for as few API-breaking changes as possible.
59
60## API Breaking Changes
61- **Sept 3, 2015**: The `Options` struct passed to `Apply` was changed to be passed by value instead of passed by pointer. Old API at `28de026`.
62- **Aug 9, 2015**: 2.0 API. Old API at `221d034` or `gopkg.in/inconshreveable/go-update.v0`.
63
64## License
65Apache
66