Skip to main content

Crate sova_env

Crate sova_env 

Source
Expand description

Explicit .env cascade for Sova applications.

Call load at the top of main before reading configuration. Real process environment variables always win over file values.

File order (later overrides earlier):

  1. .env.{dev|prod|test} (short alias of the active mode)
  2. .env.{mode} when mode is the long name (development / production)
  3. .env.local (skipped in test)
  4. .env (final overlay)

Enums§

EnvError

Functions§

load
Load the standard cascade into the process environment (no override of existing vars).
load_from
Load cascade relative to root (typically ".").
require
Fail fast when a variable is unset or empty.
warn_missing_example
Log a warning for each key listed in example that is missing from the environment.

Type Aliases§

Result