Documentation
¶
Overview ¶
Package selfupdate replaces the running plugyard program with the latest release.
Index ¶
Constants ¶
const ChecksumsName = "checksums.txt"
ChecksumsName is the release file that lists the SHA-256 of every archive.
const DefaultBase = "https://github.com/Amraa1/plugyard"
DefaultBase is where plugyard's releases are published.
Variables ¶
var ErrNoRelease = errors.New("no release of plugyard has been published yet")
ErrNoRelease is returned when nothing has been released yet.
Functions ¶
func CleanOld ¶
func CleanOld(exePath string)
CleanOld removes what an earlier update left beside the program.
Types ¶
type Updater ¶
type Updater struct {
// Base is the address of the project, such as DefaultBase.
Base string
Client *http.Client
// OS and Arch name the build to fetch, in Go's terms.
OS, Arch string
// UserAgent is sent with every request.
UserAgent string
}
Updater fetches releases.