updatecheck

package module
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(app App, currentVersion string, prod bool, opts ...func(*Options))

Check for updates to the CLI application. Update checking happens in the background, call Print() to print the update message.

'prod' should be true if the build is a production build.

func Print

func Print()

Print whether any updates are required.

Types

type App

type App string

App is the application we are checking for updates to.

const (
	GrantedCLI App = "granted-cli"
)

type Options

type Options struct {
	Client *http.Client
	// URL is the update checking endpoint.
	URL string
}

Options allows aspects of the update checking to be customised.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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