Documentation
¶
Overview ¶
Package dotenv provides simple utilities to load environment variables from local files.
quotes processes a raw string value from an environment variable line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FilenameVariables = []string{".env", ".env.local"}
FilenameVariables defines the default files the package searches for.
Functions ¶
func Collect ¶
func Collect()
Collect iterates through the predefined filenames in FilenameVariables, parses their content, and sets the resulting key-value pairs as environment variables in the current process.
It supports:
- Standard KEY=VALUE pairs.
- Lines starting with "export ".
- Comments starting with "#".
- Basic handling of quoted values (via the internal quotes function
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package auto provides a side-effect import to automatically load environment variables from .env files during application initialization.
|
Package auto provides a side-effect import to automatically load environment variables from .env files during application initialization. |
Click to show internal directories.
Click to hide internal directories.