github

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LatestK0sBinaryURL

func LatestK0sBinaryURL(arch, osKind string, preok bool) (string, error)

LatestK0sBinaryURL returns the url for the latest k0s release by arch and os

func LatestK0sVersion

func LatestK0sVersion(preok bool) (string, error)

LatestK0sVersion returns the latest k0s version number (without v prefix)

Types

type Asset

type Asset struct {
	Name string `json:"name"`
	URL  string `json:"browser_download_url"`
}

Asset describes a github asset

type Release

type Release struct {
	URL        string  `json:"html_url"`
	TagName    string  `json:"tag_name"`
	PreRelease bool    `json:"prerelease"`
	Assets     []Asset `json:"assets"`
}

Release describes a github release

func LatestRelease

func LatestRelease(repo string, preok bool) (Release, error)

LatestRelease returns the semantically sorted latest version from github releases page for a repo. Set preok true to allow returning pre-release versions. Assumes the repository has release tags with semantic version numbers (optionally v-prefixed).

func (*Release) IsNewer added in v0.12.0

func (r *Release) IsNewer(b string) bool

Jump to

Keyboard shortcuts

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