version

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 9 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