Crate simple_env_load[][src]

Expand description

A simple .env file loader

Description

Giving a sequence of env files from most general to most specific.

Operation

Parse each file for key val remove any comments blank lines and extra whitespace.

Syntax

TEST_DATA=bar       # spaces are optional
# this is a comment
TEST_BAZ = "baz"    # double quotes are removed
TEST_BAR = 'bar'    # single quotes are removed
# above line was left intentionally blank

will produce:

KeyValue
TEST_DATAbar
TEST_BAZbaz
TEST_BARbar

Functions

Tries to load the env. vars from these paths

Parse an env string and calls a function for each key=value pair