update

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(method Method) (string, []string, bool)

func CommandString

func CommandString(method Method) string

func FetchLatestVersion

func FetchLatestVersion(ctx context.Context, method Method) (string, error)

func IsNewer

func IsNewer(latest, current string) bool

func ManualUpgradeInstructions

func ManualUpgradeInstructions(currentVersion, latestVersion string) string

func RefreshState

func RefreshState(ctx context.Context, state config.UpdateState, method Method) (config.UpdateState, error)

func RunUpgrade

func RunUpgrade(method Method, stdout, stderr io.Writer) error

func ShouldPrompt

func ShouldPrompt(settings config.Settings, state config.UpdateState, currentVersion string, method Method) (string, bool)

func ShouldRefresh

func ShouldRefresh(state config.UpdateState, now time.Time) bool

func SupportsAutoUpdate

func SupportsAutoUpdate(method Method) bool

Types

type Method

type Method string
const (
	MethodUnknown Method = "unknown"
	MethodBrew    Method = "brew"
	MethodGo      Method = "go"
)

func DetectMethod

func DetectMethod() Method

func DetectMethodFromInputs

func DetectMethodFromInputs(exePath, gobin, gopath, home string) Method

Jump to

Keyboard shortcuts

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