updater

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2022 License: 0BSD Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// GitHub repo with author e.g. "MedzikUser/go-utils"
	GitHub string
	// GitHub Token
	GitHubToken string
	// Application version e.g. "2.15.43"
	Version string
	// Binary name in archive e.g. "utils.out"
	Binary string
	// Check latest version every
	CheckEvery time.Duration
	/*
		After update exec function e.g.
			func() {
				os.Exit(0)
			}
	*/
	AfterUpdate func()

	// Should I update the major? (X.y.z)
	Major bool
}

func (*Client) AutoUpdater

func (c *Client) AutoUpdater()

Auto checks for available updates

This function checking latest version from github and automatically update your program

func (*Client) Update

func (c *Client) Update() error

Checks for available updates

If there is an update, this function will automatically update your program

Jump to

Keyboard shortcuts

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