update

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSelfUpdate

func CanSelfUpdate() (bool, string)

func FormatUpdateMessage

func FormatUpdateMessage(info *UpdateInfo) string

func GetBinaryPath

func GetBinaryPath() (string, error)

func GetUpdateCommand

func GetUpdateCommand() string

func PerformSelfUpdate

func PerformSelfUpdate() error

func ShouldCheckForUpdates

func ShouldCheckForUpdates(lastCheck time.Time) bool

Types

type Release

type Release struct {
	TagName     string    `json:"tag_name"`
	Name        string    `json:"name"`
	Body        string    `json:"body"`
	HTMLURL     string    `json:"html_url"`
	PublishedAt time.Time `json:"published_at"`
	Prerelease  bool      `json:"prerelease"`
	Draft       bool      `json:"draft"`
}

type UpdateInfo

type UpdateInfo struct {
	Available      bool
	CurrentVersion string
	LatestVersion  string
	ReleaseURL     string
	ReleaseNotes   string
}

func CheckForUpdates

func CheckForUpdates() (*UpdateInfo, error)

Jump to

Keyboard shortcuts

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