Documentation
¶
Overview ¶
Package envfile parses .env files and manipulates their contents. It supports shell-style variable substitution, quoted values, comments, environment merging, and conversion between string slices and its own environment map type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
Env represents a mapping of environment variable names to their values.
func EnvFromStrings ¶
EnvFromStrings creates an Env from a slice of "KEY=VALUE" strings.
func Load ¶
Load reads and parses an environment file at the given path. If subst is true, it performs variable substitution using values from the same file and substEnv.
func Merge ¶
Merge combines multiple environments into a single Env. Later environments override values from earlier ones.
func Parse ¶
Parse reads environment variables from an io.Reader and returns them as a map. If subst is true, it substitutes variables from the same env file and substEnv.