Documentation
¶
Overview ¶
Package config provides configuration management for epos-opensource, including platform-specific application data directory path and user-configurable settings. It determines the correct storage location based on the runtime OS:
- macOS: $HOME/Library/Application Support/epos-opensource
- Windows: %LOCALAPPDATA%/epos-opensource (falls back to %APPDATA%)
- Linux & others: ${XDG_DATA_HOME:-$HOME/.local/share}/epos-opensource
GetPath returns the resolved directory path for storing application data. DefaultConfig returns the default configuration with sensible defaults.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigPath ¶
func GetConfigPath() string
GetConfigPath returns the platform-specific config file path
func GetDataPath ¶
func GetDataPath() string
GetDataPath returns the platform-specific application data directory path
func SaveConfig ¶
SaveConfig saves the configuration to the config file
func ValidateConfig ¶
ValidateConfig validates the configuration
Types ¶
type Config ¶
type Config struct {
TUI TUIConfig `yaml:"tui"`
}
Config represents the application configuration
func LoadConfig ¶
LoadConfig loads the user configuration, falling back to defaults
type FilePickerMode ¶
type FilePickerMode string
FilePickerMode represents the mode for file picker selection
const ( FilePickerModeNative FilePickerMode = "native" FilePickerModeTUI FilePickerMode = "tui" )