selfupdate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

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

type Release

type Release struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

func New

func New(owner, repo, execFileName string) *Updater

func (*Updater) LatestVersion

func (u *Updater) LatestVersion(ctx context.Context) (*Version, error)

func (*Updater) Update

func (u *Updater) Update(ctx context.Context) error

type Version

type Version struct {
	Major uint64
	Minor uint64
	Patch uint64
}

func ParseVersion

func ParseVersion(v string) (*Version, error)

func (*Version) Compare

func (v *Version) Compare(o *Version) int

func (*Version) Greater

func (v *Version) Greater(target *Version) bool

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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