type Getenver … type osEnv … // Getenv gets the value of the requested environment variable. func (*osEnv) Getenv(s string) string { … } type explicitEnv … // Getenv returns the value of the requested environment variable (in this // implementation, really just a map lookup). func (e *explicitEnv) Getenv(s string) string { … } type defaultEnver … // Getenv returns the value of the environment variable or its default if unset. func (e *defaultEnver) Getenv(s string) string { … } func envWithDefaults(defaults map[string]string) Getenver { … }