Retrieve Internet explorer proxy settings from the registry
As is, the (my) code is really hard to test (needs actual registry modifications or env variable edition).

To ease the testing, one could change some functions:

func overrideEnvWithStaticProxy(conf ProxyConf, setenv envSetter) {
    ...
}
type envSetter func(string, string) error

func parseRegedit(regedit regeditValues) ProxyConf {
   ...
}


With this change overrideEnvWithStaticProxy and parseRegedit become self contained and can be easily tested!

This incurs a minor rewrite of getConf (which does only some plumbing):

func getConf() ProxyConf {
    once.Do(writeConf)
    return windowsProxyConf
}

func writeConf() {
    regedit, _ := readRegedit()
    windowsProxyConf = parseRegedit(regedit)
}