net/http: fix confusing shadowing in ProxyFromEnvironment
The old code worked, somewhat on accident, but was confusing, and had a useless assignment to the inner err. It worked because url.Parse parses just about anything, so the outer err was always nil, so it always fell through to the bottom return statement, even without the "err = nil" line. Instead, just have two return statements, and add a comment. R=golang-dev, r CC=golang-dev https://golang.org/cl/10448044
Showing
Please
register
or
sign in
to comment