Documentation
¶
Overview ¶
Package env provides per-request environment variable lookup that avoids mutating the process environment.
The daemon serves multiple concurrent client requests in the same process. Forwarding client env vars by mutating os.Environ would either require a process-wide mutex held across cmd.Execute() (which serialises all command execution) or risk cross-request contamination (one client's env value leaking into another client's command).
Instead, the daemon attaches a per-request env map to the cobra command's context and code that previously called os.Getenv now calls env.Lookup(ctx, key). The lookup falls back to os.Getenv when no per-request map is present so direct CLI invocations behave normally.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.