Documentation ¶ Index ¶ Variables func Default(key string, value string) func() type Env func New(getEnv func(string) string, environ func() []string) *Env func (e *Env) AddEnv(env ...string) []string func (e *Env) Get(env string) string func (e *Env) GetDefault(env string, def string) string Constants ¶ This section is empty. Variables ¶ View Source var Instance = &Env{} Functions ¶ func Default ¶ added in v0.0.25 func Default(key string, value string) func() Default will set a default key/value inside the environment only if value is empty string. It returns a function you can optionally later call to set the environment back to the original, unset value. Types ¶ type Env ¶ type Env struct { // contains filtered or unexported fields } func New ¶ func New(getEnv func(string) string, environ func() []string) *Env func (*Env) AddEnv ¶ func (e *Env) AddEnv(env ...string) []string func (*Env) Get ¶ func (e *Env) Get(env string) string func (*Env) GetDefault ¶ func (e *Env) GetDefault(env string, def string) string Source Files ¶ View all Source files env.go Click to show internal directories. Click to hide internal directories.