versioncheck

package
v0.63.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CacheTTL is how long cached version info is considered valid
	CacheTTL = 48 * time.Hour
)

Variables

This section is empty.

Functions

func Enabled

func Enabled() bool

Enabled returns whether version checking is enabled

Types

type CacheEntry

type CacheEntry struct {
	LatestVersion string    `json:"latest_version"`
	CheckedAt     time.Time `json:"checked_at"`
}

CacheEntry represents a cached version check result

func (*CacheEntry) IsExpired

func (c *CacheEntry) IsExpired() bool

IsExpired returns whether the cache entry has exceeded its TTL

type UpdateInfo

type UpdateInfo struct {
	Available bool
	Latest    string
}

UpdateInfo contains information about available updates

func CheckForUpdate

func CheckForUpdate(ctx context.Context, current *version.Version) (*UpdateInfo, error)

CheckForUpdate checks if a new version of tflint is available It returns UpdateInfo indicating if an update is available and the latest version string

Jump to

Keyboard shortcuts

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