selfcmd

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSelfUpdateUnavailable = errors.New("self update is unavailable in this build")

Functions

func Run

func Run(rt Runtime, ctx context.Context, cfg Config, args []string) int

func RunDoctor

func RunDoctor(rt Runtime, ctx context.Context, cfg Config, args []string) int

func RunInstall

func RunInstall(rt Runtime, args []string) int

func RunUninstall

func RunUninstall(rt Runtime, args []string) int

func RunUpdate

func RunUpdate(rt Runtime, ctx context.Context, args []string) int

Types

type Config

type Config = config.Config

type DoctorReport

type DoctorReport = updates.DoctorReport

type Paths

type Paths = config.Paths

type Runtime

type Runtime struct {
	Version      string
	Config       config.Config
	Paths        config.Paths
	History      *history.Store
	Stdout       io.Writer
	Stderr       io.Writer
	SelfUpdate   func(context.Context, *os.File, *os.File) (SelfUpdateResult, error)
	DoctorReport func(context.Context, Config) DoctorReport
}

type SelfUpdateResult

type SelfUpdateResult struct {
	Method         updates.InstallMethod
	UpgradeCommand string
}

Jump to

Keyboard shortcuts

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