Documentation
¶
Overview ¶
Package selfupdate answers one question — is a newer release published? — with one GitHub API call a day, cached on disk. It never fails loudly: update notice is a courtesy, not a feature the tool depends on.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var APIBase = "https://api.github.com/repos/midagedev/gadak"
APIBase is the GitHub API origin + repo path for release lookups. Tests replace it with an httptest server URL.
Functions ¶
func DropCache ¶ added in v0.16.0
DropCache removes the cached release so the next Check hits the network even inside the 24h TTL — what a person means by "check for updates now". A missing file is success. Callers must not rebuild the filename themselves: this package owns it, and a copy of the literal elsewhere would go on pointing at the old name after a rename here.
Types ¶
type Info ¶
type Info struct {
Latest string `json:"latest"` // tag without leading v, e.g. "0.3.1"
URL string `json:"url"` // release html_url
Notes string `json:"notes,omitempty"` // GitHub release body (markdown; render as plain text)
CheckedAt string `json:"checked_at"` // RFC3339 UTC
}
Info is the cached answer.