Documentation
¶
Overview ¶
Package appdata resolves where the application keeps its per-user data: the SQLite database, generated launch scripts, and logs.
The location follows each operating system's convention. The resolver itself is a pure function of the OS name, the home directory, and the environment, so every branch is testable on any host even though only macOS is supported at run time today.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnsupportedOS is returned for an operating system with no known data location. ErrUnsupportedOS = errors.New("unsupported operating system") // ErrNoHomeDir is returned when the home directory is needed but empty. ErrNoHomeDir = errors.New("home directory is not set") // ErrNoAppDataEnv is returned on Windows when %AppData% is not set. ErrNoAppDataEnv = errors.New("APPDATA environment variable is not set") )
Functions ¶
Types ¶
type Paths ¶
type Paths struct {
Root string // the per-user data directory
DB string // the SQLite database file
Launch string // generated launch scripts and prompt files
Logs string // log files
}
Paths are the application's data locations, all under one root directory.