config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package config loads jip's persistent preferences from TOML config files.

Two locations are consulted, in order:

  1. Global: <user config dir>/jip/config.toml (e.g. ~/.config/jip/config.toml)
  2. Repo: .jip.toml in the repository root

Repo values override global values. CLI flags override both (enforced by the caller, which only applies config to flags not set on the command line).

Index

Constants

This section is empty.

Variables

Dir overrides the global config directory for testing. If empty, os.UserConfigDir() is used.

Functions

func GlobalPath

func GlobalPath() (string, error)

GlobalPath returns the path of the global config file.

func Load

func Load(repoRoot string) (map[string]string, error)

Load reads the global and repo config files and returns a merged key→value map with repo values taking precedence. Values are normalized to strings ready to be applied to command-line flags (arrays are joined with commas). Missing files are not an error; repoRoot may be empty to skip the repo file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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