dotenv Parser
This is a library for parsing dotenv files. It was built for educational purposes and although tested, has not been tested against a baseline .env set of tests.
Quickstart
Example of usage:
use fs;
use HashMap;
use dotenv_lib as dot;
Docs
It is designed to follow the syntax outlined here, but does not perform any interpolation for single-quoted values and does not support triple-quoted values (aka, KEY="""VALUE""").
In brief:
- keys must start with a letter and contain only letters, underscores, and numbers.
- values terminate at a comment sign (
#), newline (\n), and end-of-file. - values may be single or double quoted.
- for values to have special characters (
#,=,\n,', and"), they must be single or double quoted (single to hold double quotes, double to hold single quotes).
Please feel free, though, to use it and report any bugs or issues.