Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // APITimeout is how long we wait for the GitHub API. APITimeout = 30 * time.Second // BaseURL is exported for tests. BaseURL = "https://api.github.com/repos/%s/%s/releases/latest" )
View Source
var ( // DownloadTimeout is the overall timeout for the download, including all retries. DownloadTimeout = time.Minute * 5 )
View Source
var UpdateMoveAfterQuit = true
UpdateMoveAfterQuit is exported for testing.
Functions ¶
func IsUpdateable ¶
IsUpdateable returns an error if this binary is not updateable.
Types ¶
type Asset ¶
type Asset struct { ID int `json:"id"` Name string `json:"name"` URL string `json:"browser_download_url"` }
Asset is a GitHub release asset.
type Release ¶
type Release struct { ID int `json:"id"` Name string `json:"name"` TagName string `json:"tag_name"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` PublishedAt time.Time `json:"published_at"` Assets []Asset `json:"assets"` Version semver.Version `json:"-"` }
Release is a GitHub release.
Click to show internal directories.
Click to hide internal directories.