Expand description
A .env loader that takes the value verbatim: everything after the first =, with no
expansion, no escape processing and no inline-comment stripping.
A line that cannot be a key/value pair is skipped by number, never the rest of the file, and a
variable already present in the process environment wins. Rationale and evidence: README.
Structs§
- Entry
- One parsed key/value pair, borrowed from the parsed content.
- Loaded
- What the load did. Names are owned: the report outlives the file’s content.
Defaultis exactly the missing-file report: nothing found, nothing applied. - Parsed
- The result of a parse: the entries in file order plus the line numbers that were skipped.
Functions§
- load
- Read the file, set every variable it declares that the process does not have yet, and report what became of every entry, so a caller can say which line of the file is not in force and why. A missing or unreadable file is not an error: the deployed environment provides real vars. A key repeated inside the file keeps its first value; the later line is reported as repeated.
- parse
- Parse
.envcontent. Pure: touches neither the environment nor the filesystem.