Documentation
Overview ¶
Package env provides helper functions for manipulating environment variables holding filepath lists.
Example ¶
This example demonstrates setting PATH and GOPATH, both for the current process (SetPath) and a child process (SetSlice). It first creates a new Go workspace for building a Hello World executable, adding the workspace to GOPATH when invoking the go tool. Then it invokes the executable built, adding the workspace bin directory to PATH.
Output: Hello World!
Index ¶
Examples ¶
Constants ¶
View Source
const VarGopath = "GOPATH"
VarGopath is the Go workspace path variable name.
View Source
const VarPath = "PATH"
VarPath is the OS (shell) specific executable search path variable name.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.