Documentation
¶
Overview ¶
Package env is the one door for environment variables owned by codeaf.
Get and Lookup are the STATIC door: their names are constants known by the caller and a foreign name is a programming error. Value and LookupValue are the DYNAMIC door: settings tables and key references may contain either a codeaf name or a provider/system name, so foreign names pass through exactly as os records them. Both doors give a CODEAF_ name the one-release fallback to its AFORGE_ spelling when the new spelling is unset or empty. // legacy-name
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvironWithout ¶
EnvironWithout returns the process environment without the named variables. Owned names remove both spellings; foreign names remove only themselves.
WHAT IT IS FOR: a child that is not part of some arrangement must not inherit the arrangement's NAMES. A descriptor handed to a child at least shows up in lsof; an inherited variable is invisible, and it travels to every grandchild for the life of the tree.
The worked case is the heavy-suite lock (cmd/codeaf-suite-lock's suiteEnviron). Exporting the lock's path so the wrapper could read it handed it to the SUITE as well, so every process the suite started tried to take a lock the suite itself was already holding, and refused itself. It made the package untestable from inside a locked box, which is a locking scheme nobody can gate.
func LookupValue ¶
LookupValue is Value with os.LookupEnv's presence bit.
func Spelling ¶
Spelling names the spelling that supplied an owned variable's value: the current one when it is set and non-empty, the former one when only it is set. A receipt that says which variable answered has to say the one the person actually wrote, or it points them at a row they never set. When neither answers it is the current name, unset.
Types ¶
This section is empty.