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()
Click to show internal directories.
Click to hide internal directories.