Documentation
¶
Overview ¶
Package env provides conveniences for working with environment variables, particularly in the context of executing external commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
Change describes a change in a value in the environment.
type Diff ¶
Diff describes differences between two environments, "M" and "N".
type Map ¶
Map is a convenient representation of a set of environment variables.
func Merge ¶
Merge merges environment variable maps. In case of key collisions, values which appear later in the maps list take precedence.
func Parse ¶
Parse parses a list of environment variables in "key=value" format. Values not in "key=value" format are ignored.
func (Map) Encode ¶
Encode encodes the Map as a slice of "key=value" pairs, suitable for use with the os/exec package.
func (Map) Format ¶
Format implements fmt.Formatter for Map as follows:
If the verb is anything but 'v', Format produces no output.
If the '+' flag is specified, Format emits newline separated "key=value" pairs. Otherwise, it emits space-separated "key=value" pairs.
Values are sorted lexicographically by key.