config

package
v1.3.2 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

This section is empty.

Types

type Config

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

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