Expand description
Configuration file management for gor.
Reads and writes ~/.config/gor/config.yml (mode 0600).
Supports host-scoped keys via a top-level hosts map.
Structs§
- GorConfig
- Top-level configuration structure stored in
~/.config/gor/config.yml.
Enums§
- Config
Error - Errors that can occur during config file operations.
Constants§
- SUPPORTED_
KEYS - Supported top-level config keys and their validation rules.
Functions§
- config_
path - Returns the path to the config file:
~/.config/gor/config.yml. - get
- Get a config value, checking host-scoped overrides first.
- load
- Load the config from disk. Returns a default empty config if the file does not exist.
- save
- Save the config to disk, creating parent directories and setting mode 0600.
- set
- Set a config value. If
hostis provided, sets it underhosts.<host>.<key>. - validate
- Validate a config key and value combination.