Documentation
¶
Overview ¶
Package config provides functionality for managing persistent settings in JSON configuration files. It supports organizing settings into sections, similar to INI files, but using JSON as the storage format. Each section is a top-level key in the JSON object containing key-value pairs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config manages application configuration, automatically storing values in either global or project-specific locations based on the key.
func New ¶
New creates a new Config instance. If projectPath is empty, only global config is used. Global config is stored in ~/.config/sandworm/config.json, while project config is stored in .sandworm in the project directory.
func (*Config) GetAllKeys ¶ added in v0.2.0
GetAllKeys returns all configuration keys as a slice of strings
func (*Config) IsGlobalKey ¶ added in v0.2.0
IsGlobalKey checks if a key is stored in global config