version

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContextKey = struct{ string }{"version"}

Functions

func WithContext

func WithContext(ctx context.Context, version *VersionInfo) context.Context

Types

type VersionInfo

type VersionInfo struct {
	CurrentVersion   string
	LatestVersion    string
	IsOutdated       bool
	IsUpdateRequired bool
	FailedToFetch    error
}

func FetchUpdateInfo

func FetchUpdateInfo(currentVersion string) VersionInfo

func FromContext

func FromContext(ctx context.Context) *VersionInfo

func (*VersionInfo) PromptUpdateIfAvailable

func (v *VersionInfo) PromptUpdateIfAvailable()

Jump to

Keyboard shortcuts

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