Load

Load files into the process environment

Go

dotenvx.Load(files...)

Usage

Defaults to .env. Existing environment variables and earlier files take precedence. Returns an error when loading fails.


if err := dotenvx.Load(".env.production", ".env"); err != nil {
    log.Fatal(err)
}

markdown