config,fetcher: remove SetAllEnv function

This commit is contained in:
Taylor Blau 2016-08-03 18:01:17 -06:00
parent 8ca4fcbade
commit 7aa4126f88
2 changed files with 0 additions and 22 deletions

@ -133,13 +133,6 @@ func (c *Configuration) Setenv(key, value string) error {
return c.Env.(*EnvFetcher).Set(key, value)
}
// SetAllEnv is shorthand for `c.Env.SetAll(env)`.
//
// TODO(taylor): remove calls to this method and avoid cast.
func (c *Configuration) SetAllEnv(env map[string]string) {
c.Env.(*EnvFetcher).SetAll(env)
}
// GetenvBool is shorthand for `c.Env.Bool(key, def)`.
func (c *Configuration) GetenvBool(key string, def bool) bool {
return c.Env.Bool(key, def)

@ -91,18 +91,3 @@ func (e *EnvFetcher) Set(key, val string) error {
return os.Setenv(key, val)
}
// SetAll replaces all key-value pairs with the given set, but does not modify
// the system's environment.
//
// Note: this method is a temporary measure while some of the old tests still
// rely on this mutable behavior.
func (e *EnvFetcher) SetAll(env map[string]string) {
e.vmu.Lock()
defer e.vmu.Unlock()
e.vals = make(map[string]string)
for k, v := range env {
e.vals[k] = v
}
}