Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergeEnvSlices ¶
MergeEnvSlices merges two slices into single, sorted, deduplicated slice by applying `over` slice into `base`. The `over` slice will be used if the key overlaps. See https://golang.org/pkg/os/exec/#Cmd `Env` field to read more about slice format.
Types ¶
type EnvSlice ¶
type EnvSlice []string
func EvalVariables ¶
EvalVariables evaluates dot env file in similar way `bash source` would do and returns all environment variables available at end of the execution of the script. Currently it supports any bash script and can cause side effects. TODO(bwplotka): Walk over syntax and allow list few syntax elements only?
func (*EnvSlice) Each ¶ added in v0.4.3
Each iterates over all the currently set variables, calling the supplied function on each variable. Iteration is stopped if the function returns false.
The names used in the calls aren't required to be unique or sorted. If a variable name appears twice, the latest occurrence takes priority.
Each is required to forward exported variables when executing programs.