...

Package vars

Overview ▾

The var package analyzes variables defined in env file and as flags

func GetVariables

func GetVariables(fs filesystem.Filesystem, filename string, override []string, lookupEnv func(string) (string, bool)) (map[string]string, error)

GetVariables returns a map of key/value from pairs defined in the file and in the list of strings in the format KEY=VALUE or KEY For a KEY entry, the value will be obtained from the environment, and if the value is not defined in the environment, the entry KEY will be ignored An empty filename will skip the extraction of pairs from file

type ErrBadKey

type ErrBadKey struct {
    // contains filtered or unexported fields
}

func NewErrBadKey

func NewErrBadKey(msg string) ErrBadKey

func (ErrBadKey) Error

func (e ErrBadKey) Error() string