Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
Env collects global functions from standard package "os" that are related to environment variables. This allows abstracting code and provides a way to concurrently test code that needs access to these shared resources.
type MapEnv ¶
MapEnv is a fake implementing Env interface. It is purposefully not concurrency-safe, so if your tests using it panic due to concurrent map access, then you need to fix a data race in your code. This is because environment variables are globals to a process, so you should be properly synchronizing access to them (e.g. with a mutex).
Click to show internal directories.
Click to hide internal directories.