update

package
v0.49.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadLatestReleaseAsset added in v0.16.0

func DownloadLatestReleaseAsset(client *http.Client, repo string, goos string) (io.ReadCloser, error)

func DownloadReleaseAsset added in v0.16.0

func DownloadReleaseAsset(client *http.Client, repo string, goos string, tag string) (io.ReadCloser, string, int, error)

func GetLatestRelease added in v0.16.0

func GetLatestRelease(client *http.Client, repo string) (*github.RepositoryRelease, error)

func GetLatestReleaseAsset added in v0.16.0

func GetLatestReleaseAsset(client *http.Client, repo string, goos string) (*github.ReleaseAsset, error)

func GetRelease added in v0.16.0

func GetRelease(client *http.Client, repo string, tag string) (*github.RepositoryRelease, error)

func GetReleaseAsset added in v0.16.0

func GetReleaseAsset(client *http.Client, repo string, goos string, tag string) (*github.ReleaseAsset, error)

func VersionGreaterThan added in v0.16.0

func VersionGreaterThan(v, w string) bool

Types

type ReleaseInfo

type ReleaseInfo struct {
	Version string `json:"tag_name"`
	URL     string `json:"html_url"`
}

ReleaseInfo stores information about a release

func CheckForUpdate

func CheckForUpdate(client *http.Client, stateFilePath, repo string, currentVersion string) (*ReleaseInfo, error)

CheckForUpdate checks whether a new release is available on GitHub

type StateEntry

type StateEntry struct {
	CheckedForUpdateAt time.Time   `yaml:"checked_for_update_at"`
	LatestRelease      ReleaseInfo `yaml:"latest_release"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL