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

state

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveActive

func SaveActive(dir string, a Active) error

SaveActive writes the active selection a to the state directory dir, which is made if it is not there. UpdatedAt is set to now, whatever a has in it.

Types

type Active

type Active struct {
	ActiveStoreID             string `json:"active_store_id,omitempty"`
	ActiveGameInstallID       int64  `json:"active_game_install_id,omitempty"`
	ActiveGameInstallSelector string `json:"active_game_install_selector,omitempty"`
	UpdatedAt                 string `json:"updated_at,omitempty"`
}

func LoadActive

func LoadActive(dir string) (Active, error)

LoadActive reads the active selection from the state directory dir. There is none until one is saved, which is an empty Active and not an error, and nothing is made by looking: not the directory, and not the file.

Jump to

Keyboard shortcuts

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