upgrade

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package upgrade implements `ytrack upgrade`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdUpgrade

func NewCmdUpgrade(f *cmdutil.Factory, opts *Options) *cobra.Command

NewCmdUpgrade returns the upgrade command. opts nil means the real GitHub releases, trust root and executable.

Types

type Options

type Options struct {
	HTTP   *http.Client
	APIURL string
	// TrustedRoot returns the Sigstore trusted material signatures must
	// chain to; NoSCT is for test Sigstores only.
	TrustedRoot func() (root.TrustedMaterial, error)
	NoSCT       bool
	// Executable returns the path of the running binary.
	Executable func() (string, error)
	GOOS       string
	GOARCH     string
	// Sleep waits between download retries; nil waits for real.
	Sleep func(ctx context.Context, d time.Duration) error
	// Run runs a ytrack binary: the new one's `version` before it is swapped
	// in, and its `skill sync` after.
	Run upgrade.Runner
}

Options are the command's dependencies; tests replace them.

Jump to

Keyboard shortcuts

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