Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllowPrereleases = false
AllowPrereleases defines whether pre-releases may be included
Functions ¶
func DownloadToFile ¶
DownloadToFile downloads a URL to a file
func GreaterThan ¶
GreaterThan compares the current version to a different version returning < 1 not upgradeable
func ReplaceFile ¶
ReplaceFile replaces one file with another. Running files cannot be overwritten, so it has to be moved and the new binary saved to the original path. This requires read & write permissions to both the original file and directory. Note, on Windows it is not possible to delete a running program, so the old exe is renamed and moved to os.TempDir()
Types ¶
type Releases ¶
type Releases []struct {
Name string `json:"name"` // release name
Tag string `json:"tag_name"` // release tag
Prerelease bool `json:"prerelease"` // Github pre-release
Assets []struct {
BrowserDownloadURL string `json:"browser_download_url"`
ID int64 `json:"id"`
Name string `json:"name"`
Size int64 `json:"size"`
} `json:"assets"`
}
Releases struct for Github releases json
Click to show internal directories.
Click to hide internal directories.