globalconfig

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() string

DefaultPath returns the config file location, respecting XDG_CONFIG_HOME.

Types

type Config

type Config struct {
	Dotfiles DotfilesConfig `toml:"dotfiles"`
}

Config holds user-level crib settings from ~/.config/crib/config.toml.

func Load

func Load() (*Config, error)

Load reads the global config from the default path. Returns a zero Config (not an error) if the file does not exist.

func LoadFrom

func LoadFrom(path string) (*Config, error)

LoadFrom reads the global config from the given path. Returns a zero Config (not an error) if the file does not exist.

type DotfilesConfig

type DotfilesConfig struct {
	Repository     string `toml:"repository"`
	TargetPath     string `toml:"targetPath"`
	InstallCommand string `toml:"installCommand"`
}

DotfilesConfig configures dotfiles repository cloning and installation.

Jump to

Keyboard shortcuts

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