config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package config loads manly's user configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilePath added in v1.4.0

func FilePath(home string) (string, error)

FilePath returns the resolved user configuration path for home.

Types

type Analytics added in v1.4.0

type Analytics struct {
	Enabled  bool   `koanf:"enabled"`
	Provider string `koanf:"provider"`
}

Analytics controls local concept-usage recording and reporting.

type Config

type Config struct {
	Root      string    `koanf:"root"`
	Defaults  Defaults  `koanf:"defaults"`
	Display   Display   `koanf:"display"`
	Analytics Analytics `koanf:"analytics"`
}

Config is the validated runtime configuration for one invocation.

func Load

func Load(home string) (Config, error)

Load resolves and loads the user's configuration. A missing configuration is bootstrapped with the built-in defaults; an existing file is never rewritten.

type Defaults

type Defaults struct {
	Format string       `koanf:"format"`
	List   ListDefaults `koanf:"list"`
}

Defaults contains command defaults.

type Display

type Display struct {
	Actions bool `koanf:"actions"`
	Usage   bool `koanf:"usage"`
}

Display controls optional list and show presentation elements.

type ListDefaults

type ListDefaults struct {
	Recursive bool `koanf:"recursive"`
}

ListDefaults contains list command defaults.

Jump to

Keyboard shortcuts

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