pub fn dotenv_flow() -> Result<Vec<PathBuf>>Expand description
Similar to dotenv, but implements the dotenv-flow strategy by loading multiple .envs following
the order determined by their suffixes.
The strategy is as follows:
- if a DOTENV_ENV environment variable is set, load .env.{DOTENV_ENV}.local (e.g. .env.staging.local)
- load .env.local
- if a DOTENV_ENV environment variable is set, load .env.{DOTENV_ENV} (e.g. .env.staging)
- load .env
ยงExamples
use dotenv_flow;
dotenv_flow::dotenv_flow().ok();