Documentation ¶
Index ¶
- func EncodeEnv(w io.Writer, env map[string]string) error
- func EnvMapFromReader(r io.Reader) map[string]string
- func LoadEnv(toLoad map[string]Variable, loaders ...EnvLoader) (map[string]string, error)
- func ParseKV(kv string) (string, string, error)
- func ParseTemplateVars(r io.Reader) (map[string]Variable, error)
- type EnvLoader
- type Variable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvMapFromReader ¶
EnvMapFromReader reads a .env formatted file from the given path, and returns a map of key/value pairs
Types ¶
type EnvLoader ¶
func LoadEnvReader ¶
LoadEnvReader reads a .env formatted file from the given path, and returns a loader function
type Variable ¶
type Variable struct { // Name of the variable Name string // UnsetEmpty is true if the variable should be empty if it is not set, // rather than non-existent UnsetEmpty bool // Short form is the form without braces Short bool // If Default is empty, and the value is not set, then the value is defaulted Default string // If Error is not empty, and the value is not set, then the error is returned Error string }
Variable is the right hand side of an environment variable expression
Click to show internal directories.
Click to hide internal directories.