Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package config loads optional settings from <home>/.bildomat/config.yml. It returns settings and classified faults so the caller can warn about configuration errors without stopping the run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnknownProviderFault

func UnknownProviderFault(filePath, providerID string) error

UnknownProviderFault describes an api-keys provider absent from the catalog.

Types

type Settings

type Settings struct {
	DefaultModel     string            `yaml:"default-model"`
	DefaultOutputDir string            `yaml:"output-dir"`
	APIKeys          map[string]string `yaml:"api-keys"`
}

Settings holds optional defaults and API keys. Empty values mean unset; Load removes empty API keys.

  • DefaultModel: the model used when --model is omitted; anything the --model flag accepts
  • DefaultOutputDir: the directory used when no output location is given; anything the directory portion of --output-path accepts
  • APIKeys: API keys by provider ID, which outrank the providers' environment variables

func Load

func Load() (Settings, string, []error)

Load reads the optional configuration file and returns settings, its path, and classified faults. A missing file returns empty settings without a fault; an unresolved home returns an empty path.

Jump to

Keyboard shortcuts

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