Documentation
¶
Index ¶
Constants ¶
View Source
const ( GitHubOwner = "mehmetkoksal-w" GitHubRepo = "mind-palace" )
View Source
const NoticeTTL = 24 * time.Hour
NoticeTTL is the cooldown period before showing the update notice again.
Variables ¶
This section is empty.
Functions ¶
func GetCacheDir ¶
GetCacheDir returns the directory used for caching update information.
func MarkNoticeShown ¶
func MarkNoticeShown(cacheDir string)
MarkNoticeShown updates the cache to record that the update notice was shown.
func ShouldShowNotice ¶
ShouldShowNotice checks if the update notice should be shown based on cooldown. Returns true if the notice hasn't been shown in the last 24 hours.
Types ¶
type Asset ¶
type Asset struct {
Name string `json:"name"`
Size int64 `json:"size"`
BrowserDownloadURL string `json:"browser_download_url"`
}
Asset represents a release asset.
type CheckResult ¶
type CheckResult struct {
CurrentVersion string
LatestVersion string
UpdateAvailable bool
ReleaseURL string
DownloadURL string
ChecksumURL string
}
CheckResult contains information about an update check.
func Check ¶
func Check(currentVersion string) (*CheckResult, error)
Check compares the current version with the latest release on GitHub.
func CheckCached ¶
func CheckCached(currentVersion, cacheDir string) (*CheckResult, error)
CheckCached performs an update check, using a local cache if it's still valid.
Click to show internal directories.
Click to hide internal directories.