state

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatePath

func GetStatePath() (string, error)

GetStatePath returns the path to the state file

Types

type InstallState

type InstallState struct {
	DistroName string `yaml:"distro_name"`
	Version    string `yaml:"version"`
	Mode       string `yaml:"mode"`
}

InstallState represents the saved state for a single distro installation

type State

type State struct {
	Installations map[string]InstallState `yaml:"installations"`
}

State represents the persisted state file

func Load

func Load() (*State, error)

Load reads the state from disk

func (*State) GetInstallState

func (s *State) GetInstallState(distroKey string) (InstallState, bool)

GetInstallState retrieves the saved state for a distro

func (*State) Save

func (s *State) Save() error

Save writes the state to disk

func (*State) SetInstallState

func (s *State) SetInstallState(distroKey string, installState InstallState)

SetInstallState saves the state for a distro

Jump to

Keyboard shortcuts

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