updatecheck

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLatestReleaseURL = "https://api.github.com/repos/Colvin-Y/kubernetes-ontology/releases/latest"
	DefaultAutoCheckTimeout = 1500 * time.Millisecond

	EnvLatestReleaseURL = "KUBERNETES_ONTOLOGY_UPDATE_URL"
	EnvSkipAutoCheck    = "KUBERNETES_ONTOLOGY_SKIP_UPDATE_CHECK"
)

Variables

This section is empty.

Functions

func MaybeNotify

func MaybeNotify(ctx context.Context, w io.Writer, options Options)

Types

type Options

type Options struct {
	CurrentVersion   string
	BinaryName       string
	GOOS             string
	GOARCH           string
	LatestReleaseURL string
	Client           *http.Client
}

type Result

type Result struct {
	CurrentVersion  string
	LatestVersion   string
	ReleaseURL      string
	AssetName       string
	AssetURL        string
	UpdateAvailable bool
	Comparable      bool
	UpdatedPath     string
	Staged          bool
}

func CheckLatest

func CheckLatest(ctx context.Context, options Options) (*Result, error)

func SelfUpdate

func SelfUpdate(ctx context.Context, targetPath string, options Options) (*Result, error)

func (Result) Notice

func (r Result) Notice() string

func (Result) ReleasePage

func (r Result) ReleasePage() string

Jump to

Keyboard shortcuts

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