env_dir

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDefault

func MakeDefault(
	context errors.Context,
	utilityName string,
	debugOptions debug.Options,
) mad_env_dir.Env

MakeDefault forwards to mad_env_dir.MakeDefault. The dodder EnvVarNames bundle is injected via configFor so the previous dodder-only env-var contracts (DODDER_XDG_UTILITY_OVERRIDE etc.) keep working.

func MakeDefaultAndInitialize

func MakeDefaultAndInitialize(
	context errors.Context,
	utilityName string,
	do debug.Options,
	repoId mad_env_dir.RepoId,
) mad_env_dir.Env

func MakeDefaultNoInit

func MakeDefaultNoInit(
	context errors.Context,
	utilityName string,
	debugOptions debug.Options,
) mad_env_dir.Env

func MakeFromXDGDotenvPath

func MakeFromXDGDotenvPath(
	context errors.Context,
	debugOptions debug.Options,
	xdgDotenvPath string,
) mad_env_dir.Env

MakeFromXDGDotenvPath: scope is determined by the dotenv's XDG; configFor is therefore called with the dodder default since the scope isn't known until the dotenv is read. dodder's env-var bundle is the right choice here regardless because dodder processes always honor DODDER_XDG_UTILITY_OVERRIDE.

func MakeWithDefaultHome

func MakeWithDefaultHome(
	context errors.Context,
	utilityName string,
	debugOptions debug.Options,
	permitCwdXDGOverride bool,
	initialize bool,
) mad_env_dir.Env

func MakeWithHomeAndInitialize

func MakeWithHomeAndInitialize(
	context errors.Context,
	utilityName string,
	home string,
	debugOptions debug.Options,
) mad_env_dir.Env

MakeWithHomeAndInitialize keeps dodder's argument order (utilityName, home, debug) which differs from madder's (Config, scope, home).

func MakeWithXDG

func MakeWithXDG(
	context errors.Context,
	debugOptions debug.Options,
	x xdg.XDG,
) mad_env_dir.Env

MakeWithXDG: scope is on the supplied xdg.UtilityName; we route through configFor so the right env-var bundle attaches.

func MakeWithXDGRootOverrideHomeAndInitialize

func MakeWithXDGRootOverrideHomeAndInitialize(
	context errors.Context,
	xdgRootOverride string,
	utilityName string,
	debugOptions debug.Options,
) mad_env_dir.Env

MakeWithXDGRootOverrideHomeAndInitialize keeps dodder's argument order (xdgRootOverride before utilityName) for caller stability. Forwards to madder's MakeWithXDGRootOverrideHomeAndInitialize which uses the inverse order.

Types

This section is empty.

Source Files

  • construction.go

Jump to

Keyboard shortcuts

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