Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Set ¶
func Set(val interface{}, config *EnvOptions, paths ...string) error
Set non-zero values on a struct using reflection to parse values from os.Environ() followed by parsing values from any provided .env files. Existing values will not be overwritten if the same key is encountered later. If a file doesn't exist it will be skipped.
func SetFiles ¶
func SetFiles(val interface{}, config *EnvOptions, paths ...string) error
Set non-zero values on a struct using reflect to parse values from .env files. This method has the same behavior as Set, but doesn't use os.Environ() at all.
Types ¶
type EnvMap ¶
func ParseEnvFile ¶
Parse a single env file using godotenv.Parse
func ParseFiles ¶
Parse multiple env files and merge the results into a single map. Existing values are skipped when merging. This defines the precedence as left to right.
type EnvOptions ¶ added in v0.8.12
type EnvOptions struct {
Overwrite bool
}
Click to show internal directories.
Click to hide internal directories.