selfupdate

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package selfupdate manages official GOX releases independently of project dependencies.

Index

Constants

View Source
const Interval = 24 * time.Hour

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

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

type Manager

type Manager struct {
	Executable, StateDir, Current, OS, Arch, URL string
	Client                                       *http.Client
}

func New

func New(version string) (*Manager, error)

func (*Manager) Check

func (m *Manager) Check(ctx context.Context, force bool) (Release, error)

func (*Manager) Install

func (m *Manager) Install(ctx context.Context, r Release) error

func (*Manager) Managed

func (m *Manager) Managed() bool

func (*Manager) Newer

func (m *Manager) Newer(r Release) bool

func (*Manager) Watch

func (m *Manager) Watch(ctx context.Context, available func(Release))

Watch never interferes with a running application. Its caller chooses whether an available release should be installed or only announced.

type Release

type Release struct {
	Version    string  `json:"tag_name"`
	Draft      bool    `json:"draft"`
	Prerelease bool    `json:"prerelease"`
	Assets     []Asset `json:"assets"`
}

Jump to

Keyboard shortcuts

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