Help us shape the future of Go! Take the 2026 Go Developer Survey

selfupdate

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleInternalCommand

func HandleInternalCommand(context.Context, []string) (bool, error)

func RepairDesktopRuntimeIfNeeded added in v0.7.5

func RepairDesktopRuntimeIfNeeded(context.Context, io.Writer) error

func Run

func Run(ctx context.Context, output io.Writer) error

func RunLocalArchive added in v0.9.0

func RunLocalArchive(ctx context.Context, archivePath, checksumPath, targetVersion string, output io.Writer) error

RunLocalArchive lets Windows Setup hand an already verified/downloaded Release artifact to the generation Update Engine used by Installer-owned local activation. Managed online self-update itself downloads and launches the complete Setup instead. The legacy layout never calls this entrypoint; it is only valid once stable shims + active-version.json have established generation ownership.

func RunWithProgress added in v0.9.0

func RunWithProgress(ctx context.Context, output io.Writer, progressOutput io.Writer) error

Types

type CheckResult added in v0.7.0

type CheckResult struct {
	CurrentVersion         string `json:"current_version"`
	LatestVersion          string `json:"latest_version"`
	DesktopCurrentVersion  string `json:"desktop_current_version,omitempty"`
	UpdateAvailable        bool   `json:"update_available"`
	DesktopUpdateAvailable bool   `json:"desktop_update_available,omitempty"`
	Message                string `json:"message"`
}

func Check added in v0.7.0

func Check(ctx context.Context) (CheckResult, error)

type UpdateProgressEvent added in v0.9.0

type UpdateProgressEvent struct {
	SchemaVersion  int                 `json:"schema_version"`
	Type           string              `json:"type"`
	Stage          UpdateProgressStage `json:"stage,omitempty"`
	CurrentVersion string              `json:"current_version,omitempty"`
	TargetVersion  string              `json:"target_version,omitempty"`
	Asset          string              `json:"asset,omitempty"`
	Bytes          int64               `json:"bytes,omitempty"`
	TotalBytes     int64               `json:"total_bytes,omitempty"`
	Error          string              `json:"error,omitempty"`
}

type UpdateProgressStage added in v0.9.0

type UpdateProgressStage string
const (
	UpdateStageChecking      UpdateProgressStage = "checking"
	UpdateStageDownloading   UpdateProgressStage = "downloading"
	UpdateStageVerifying     UpdateProgressStage = "verifying"
	UpdateStageExtracting    UpdateProgressStage = "extracting"
	UpdateStageInstalling    UpdateProgressStage = "installing"
	UpdateStageUpdatingSkill UpdateProgressStage = "updating_skills"
	UpdateStageRestarting    UpdateProgressStage = "restarting"
)

Jump to

Keyboard shortcuts

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