update

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndNotify

func CheckAndNotify(currentVersion string)

func GetStateFilePath

func GetStateFilePath() (string, error)

func GetUpdateInstructions

func GetUpdateInstructions(method InstallMethod, currentVer, latestVer string) string

Types

type Checker

type Checker struct {
	// contains filtered or unexported fields
}

func NewChecker

func NewChecker(version string) *Checker

func (*Checker) CheckForUpdate

func (c *Checker) CheckForUpdate(ctx context.Context) (*selfupdate.Release, bool, error)

func (*Checker) PerformUpdate

func (c *Checker) PerformUpdate(ctx context.Context, release *selfupdate.Release) error

type InstallMethod

type InstallMethod int
const (
	InstallMethodUnknown InstallMethod = iota
	InstallMethodHomebrew
	InstallMethodGoInstall
	InstallMethodSystem
	InstallMethodBinary
)

func DetectInstallMethod

func DetectInstallMethod() InstallMethod

func (InstallMethod) String

func (m InstallMethod) String() string

type State

type State struct {
	LastCheck   time.Time `json:"last_check"`
	LastVersion string    `json:"last_version"`
}

func LoadState

func LoadState() (*State, error)

func (*State) Save

func (s *State) Save() error

func (*State) ShouldCheck

func (s *State) ShouldCheck() bool

Jump to

Keyboard shortcuts

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