Documentation ¶
Index ¶
Constants ¶
View Source
const ( WoReleaseURI = "https://api.github.com/repos/ali-furkan/wo/releases/latest" ErrReleaseNotFound = "release not found" ErrInternetConn = "get release failure: please check your internet connection" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReleaseInfo ¶
type ReleaseInfo struct { Version string `json:"tag_name"` URL string `json:"url"` InfoURL string `json:"html_url"` PublishedAt string `json:"published_at"` }
func CheckForUpdate ¶
func CheckForUpdate() (*ReleaseInfo, error)
type UpdateState ¶
type UpdateState struct { LastCheckedAt time.Time `yaml:"last_checked_at"` LatestRelease ReleaseInfo `yaml:"latest_release"` }
Click to show internal directories.
Click to hide internal directories.