Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmptyAttributeError ¶
EmptyAttributeError is for when a required attribute is empty
Types ¶
type MultiConfig ¶
type MultiConfig struct {
// contains filtered or unexported fields
}
MultiConfig is simply the struct method-wrapper for the "multiconfig" package
func (*MultiConfig) AddFromString ¶
func (s *MultiConfig) AddFromString(path string, body string) error
AddFromString allows to add new *.env string to the list of MultiConfigs
- Need to provide the body-content as a string.
- Need to provide a "path" to where the .env was read from, to allow for combination based on lexical-order of this path.
- This gets parsed immediately, not deferred until combined.
TODO: Is "path" the wrong name for this?
func (*MultiConfig) Combine ¶
func (s *MultiConfig) Combine() (map[string]string, error)
Combine Combine all the .env's provided into a single .env map
Returns a new .env map (gotenv.Env) with the combined .env's. The .env's are combined by lexical-ordering of the "path" field;
i.e. an .env with a "path" of "z..." will be added after those with a "path" of "a..."
TODO: Need to make sure file's named ".env" (only) are parsed last, somehow...