version

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReleaseInfoTimeout = time.Second * 1
	Release            = "https://api.github.com/repos/%s/releases/latest"
)

Functions

func IsCurrentLatest

func IsCurrentLatest(currVersion, latestVersion string) (bool, error)

IsCurrentLatest returns true if the current version string is greater than or equal to latestVersion as per semantic versioning

func UpdateNotice

func UpdateNotice(currentVersion, githubRepo string) string

UpdateNotice returns a notice message if there is a newer version available Note: all errors are ignored

Types

type Info

type Info struct {
	Version string
	TarURL  string
}

func ReleaseInfo

func ReleaseInfo(releaseURL string) (*Info, error)

ReleaseInfo fetches details related to provided release URL releaseURL should point to a specific version for example: https://api.github.com/repos/goto/optimus/releases/latest

Jump to

Keyboard shortcuts

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