Documentation
¶
Index ¶
Constants ¶
View Source
const ( // GitHubRepo is the repository for version checks. GitHubRepo = "dhabedank/prd-parser" // CheckInterval is how often to check for updates (24 hours). CheckInterval = 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func IsFirstRun ¶
func IsFirstRun() bool
IsFirstRun returns true if this appears to be the first run. Checks for existence of config file or first-run marker.
func PrintFirstRunNotice ¶
func PrintFirstRunNotice()
PrintFirstRunNotice prints a welcome message for first-time users.
func PrintUpdateNotice ¶
func PrintUpdateNotice(result *CheckResult)
PrintUpdateNotice prints a notice if an update is available.
Types ¶
type CheckResult ¶
type CheckResult struct {
CurrentVersion string
LatestVersion string
UpdateAvailable bool
ReleaseURL string
}
CheckResult holds the result of a version check.
func CheckForUpdate ¶
func CheckForUpdate(currentVersion string) *CheckResult
CheckForUpdate checks if a newer version is available. Returns nil if check should be skipped (checked recently) or on error.
type GitHubRelease ¶
GitHubRelease represents a GitHub release.
Click to show internal directories.
Click to hide internal directories.