Documentation ¶
Overview ¶
package Updater checks and downloads new versions
Index ¶
- Variables
- func GithubLatest(repo, name string) (string, string, string, error)
- func GithubUpdate(repo, appName, currentVersion string) (string, error)
- func GreaterThan(toVer, fromVer string) bool
- func TarGZExtract(inputFilePath, outputFilePath string) (err error)
- func Unzip(src string, dest string) ([]string, error)
- type Release
- type Releases
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // AllowPrereleases defines whether pre-releases may be included AllowPrereleases = false )
Functions ¶
func GithubLatest ¶
GithubLatest fetches the latest release info & returns release tag, filename & download url
func GithubUpdate ¶
GithubUpdate the running binary with the latest release binary from Github
func GreaterThan ¶
GreaterThan compares the current version to a different version returning < 1 not upgradeable
func TarGZExtract ¶
TarGZExtract extracts a archive from the file inputFilePath. It tries to create the directory structure outputFilePath contains if it doesn't exist. It returns potential errors to be checked or nil if everything works.
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.