diff --git a/config/config.go b/config/config.go index 5b1a5d8f..4f3dfa67 100644 --- a/config/config.go +++ b/config/config.go @@ -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) diff --git a/config/env_fetcher.go b/config/env_fetcher.go index d3d1d543..e649026d 100644 --- a/config/env_fetcher.go +++ b/config/env_fetcher.go @@ -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 - } -}