version

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 8 Imported by: 0

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 MarkInitialized

func MarkInitialized()

MarkInitialized creates the 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

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	HTMLURL string `json:"html_url"`
}

GitHubRelease represents a GitHub release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL