config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config resolves settings and XDG paths on Linux and macOS.

Index

Constants

View Source
const Defaults = "concurrency = 2\nkeep_runs = 50\nallow_agent_scheduling = false\nmdkb_path = \"\"\nmdkb_root = \"\"\n"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ConfigDir            string `toml:"-"`
	DataDir              string `toml:"data_dir"`
	Concurrency          int    `toml:"concurrency"`
	KeepRuns             int    `toml:"keep_runs"`
	AllowAgentScheduling bool   `toml:"allow_agent_scheduling"`
	MDKBPath             string `toml:"mdkb_path"`
	MDKBRoot             string `toml:"mdkb_root"`
}

func Load

func Load(opts Options) (Config, error)

Load finds config.toml using flag > env > XDG, then overlays paths in the same order. The config directory stays with that source; only data_dir can come from the file.

func (Config) Database

func (c Config) Database() string

func (Config) File

func (c Config) File() string

func (Config) JobsDir

func (c Config) JobsDir() string

type Options

type Options struct {
	ConfigDir string
	DataDir   string
}

type ValidationError

type ValidationError struct{ Err error }

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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