Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigValue ¶
GetConfigValue retrieves a specific configuration value.
func SaveGlobalConfig ¶
func SaveGlobalConfig(config *GlobalConfig) error
SaveGlobalConfig saves the global configuration to ~/.config/godig/config.yaml.
func SetConfigValue ¶
SetConfigValue sets a specific configuration value and saves it.
Types ¶
type GlobalConfig ¶
type GlobalConfig struct {
APIKey string `yaml:"api_key,omitempty"`
Server string `yaml:"server,omitempty"`
}
GlobalConfig represents the user's global configuration.
func LoadGlobalConfig ¶
func LoadGlobalConfig() (*GlobalConfig, error)
LoadGlobalConfig loads the global configuration from ~/.config/godig/config.yaml. Returns an empty config if the file doesn't exist.
Click to show internal directories.
Click to hide internal directories.