Documentation ¶
Overview ¶
Package config provides configuration loader based on env vars.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLoaders ¶ added in v0.0.4
DefaultLoaders populate ENV vars from .env files.
func Load ¶
Load loads config from ENV vars, loaders are called to populate ENV vars in advance.
In no loaders are provided then vars from .env.template, .env, .env.<ENVIRONMENT> files are loaded if available. Use nil or any other source to avoid that.
func WithEnvFiles ¶
WithEnvFiles populates env vars from provided files.
It returns an error if file does not exist.
func WithOptionalEnvFiles ¶
WithOptionalEnvFiles populates env vars from provided files that exist.
Non-existent files are ignored.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.