Documentation ¶
Overview ¶
Package envfile provides tools to read and load environment variables from files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Overload ¶
Overload reads from filename and sets and overwrites the environment variables using env.Overload.
func OverloadFS ¶
OverloadFS reads from filename and sets and overwrites the environment variables using env.Overload.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
NewReader returns a Reader which looks up environment variables from the provided fs.File.
dec := env.NewDecoder(envfile.NewReader(file))
func Open ¶
Open opens filename for reading using os.Open and returns a new *Reader. It is the caller's responsibility to close the Reader when finished. If there is an error, it will be of type *os.PathError.
Click to show internal directories.
Click to hide internal directories.