envfile

package
v0.10.582 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureExists added in v0.10.559

func EnsureExists(path string) (bool, error)

EnsureExists creates path (parent directories included) as an empty commented dotenv file when absent, so packaged installs (eg MCP bundles) get a working credential store on first launch; an existing file is never touched, since bundle updates must not wipe populated credentials. Returns whether this call created the file. An empty path is a no-op.

func Source

func Source(path string) ([]string, bool, error)

Source injects the file's pairs into the process environment, overwriting existing vars, and returns the sorted key names set. An empty path is a no-op; a missing file is not an error ("nothing to source yet").

Types

This section is empty.

Jump to

Keyboard shortcuts

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