Documentation ¶
Overview ¶
Package getenv wraps running the appropriate commands for getting the user's environ.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
Command holds the configuration for running the command necessary to get the EnvVars from the user's shell.
func (*Command) CommandLine ¶
CommandLine returns the appropriate command-line to extract the environ from the user's shell. Currently supports "bash" and "zsh".
func (*Command) Exec ¶
Exec runs the necessary command, with the given environ, and returns the Stdout output. StdErr for the command is sent to the user. If No-op mode has been set, the command isn't run, but what would have been run is logged.
func (*Command) ExecToLines ¶
ExecToLines runs the command, and parses Stdout into an array of NL-separated lines.