config

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIKey

func GetAPIKey() string

GetAPIKey returns the API key from the config file, or empty string if not set.

func Path

func Path() (string, error)

Path returns the path to the config file (~/.config/exa/config.yaml)

func Save

func Save(cfg *Config) error

Save writes the Config struct to the config file.

Types

type Config

type Config struct {
	APIKey string `yaml:"api_key"`
}

func Load

func Load() (*Config, error)

Load reads the config file and returns the Config struct. Returns an empty Config (not an error) if the file doesn't exist.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL