Documentation ¶
Overview ¶
Package update is checking for a new version of Pscale and informs the user to update. Most of the logic is copied from cli/cli: https://github.com/cli/cli/blob/trunk/internal/update/update.go and updated to our own needs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReleaseInfo ¶
type ReleaseInfo struct { Version string `json:"tag_name"` URL string `json:"html_url"` PublishedAt time.Time `json:"published_at"` }
ReleaseInfo stores information about a release
type StateEntry ¶
type StateEntry struct { CheckedForUpdateAt time.Time `yaml:"checked_for_update_at"` LatestRelease ReleaseInfo `yaml:"latest_release"` }
StateEntry stores the information we have checked for a new version. It's used to decide whether to check for a new version or not.
type UpdateInfo ¶
type UpdateInfo struct { Update bool Reason string ReleaseInfo *ReleaseInfo }
Click to show internal directories.
Click to hide internal directories.