config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() string

Path returns the config file path, respecting XDG_CONFIG_HOME.

Types

type Config

type Config struct {
	Disabled []string
}

Config holds user preferences loaded from ~/.config/chop/config.yml.

func Load

func Load() Config

Load reads the config file and returns a Config. Returns defaults if the file doesn't exist or can't be parsed.

func LoadFrom

func LoadFrom(path string) Config

LoadFrom reads config from a specific path. Exported for testing.

func (Config) IsDisabled

func (c Config) IsDisabled(command string) bool

IsDisabled returns true if the given command is in the disabled list.

Jump to

Keyboard shortcuts

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