Help us shape the future of Go! Take the 2026 Go Developer Survey

update

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package update replaces the running binary with the latest GitHub release.

Index

Constants

View Source
const DefaultAPIURL = "https://api.github.com/repos/vicgupta/tinyagent/releases/latest"

Variables

This section is empty.

Functions

This section is empty.

Types

type Updater

type Updater struct {
	APIURL  string // latest-release endpoint
	Current string // running version, e.g. v0.1.0 or dev
	ExePath string // binary to replace
	Client  *http.Client
	GOOS    string
	GOARCH  string
}

func New

func New(current string) (*Updater, error)

func (*Updater) Run

func (u *Updater) Run(ctx context.Context) (string, error)

Run installs the latest release if it is newer than Current and returns a message describing what happened.

Jump to

Keyboard shortcuts

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