Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNewer ¶ added in v0.1.21
IsNewer reports whether latest (a "v"-prefixed semver from the registry) is strictly newer than the running version current (with or without the "v"). The comparison uses release cores: a dev build stamped from git describe (0.1.20-8-gc45ca44) is semver-prerelease and would otherwise rank below its own base release, re-suggesting an "upgrade" to code it is already ahead of. An empty or unparseable current version counts as outdated.
Types ¶
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater manages self-update operations. Platform-specific methods (PrepareSelfReplace, CleanupStaleFiles, CanRestorePreviousVersion) live in selfreplace_unix.go and selfreplace_windows.go.
func (*Updater) CanRestorePreviousVersion ¶
CanRestorePreviousVersion reports whether PrepareSelfReplace created a restorable backup for the current update attempt.
func (*Updater) CleanupStaleFiles ¶
func (u *Updater) CleanupStaleFiles()
CleanupStaleFiles is a no-op on Unix (no .old files are created).
func (*Updater) PrepareSelfReplace ¶
PrepareSelfReplace is a no-op on Unix, which allows overwriting a running executable via inode semantics.