goupdate

package module
v0.0.0-...-c9d2c38 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2018 License: MIT Imports: 12 Imported by: 0

README

goupdate Go Report Card

An auto updater library in Go

Documentation

Index

Constants

View Source
const (
	VERSION = "1.0.0.0"
)

Define the version of GoUpdate

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

type Updater struct {
	VersionURL     string
	CurrentVersion string
	CheckFrequency int
	ShowProgress   bool
	// contains filtered or unexported fields
}

Updater is the updater object which contains the information needed for GoUpdate to function properly

func CreateUpdater

func CreateUpdater(url, currentVersion string, checkFrequency int, showProgress bool) Updater

CreateUpdater creates and returns a constructed Updater object using a url, current version and check frequency (0 for off)

func (Updater) CheckForUpdate

func (u Updater) CheckForUpdate() (available bool, err error)

CheckForUpdate manually performs an update check and returns a bool based on whether an update is available or not

func (Updater) PerformUpdate

func (u Updater) PerformUpdate() error

PerformUpdate downloads the updated file, unzips it and displays the changelog

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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