Expand description
Minimal .env file parser for secretsh import-env.
Supported syntax:
KEY=valueexport KEY=value(optionalexportprefix, stripped)KEY="value with spaces"(double-quoted,\"and\\escapes)KEY='literal value'(single-quoted, no escape processing)# comment lines(ignored)- Blank lines (ignored)
- Inline comments:
KEY=value # comment(only when unquoted)
Key names must match the vault constraint [A-Za-z_][A-Za-z0-9_]*.
Values are returned as raw bytes (Vec<u8>).
Structs§
- EnvEntry
- A single key-value entry parsed from a
.envfile.
Functions§
- parse_
dotenv - Parse a
.envfile and return all key-value entries. - parse_
dotenv_ str - Parse the string contents of a
.envfile.