• Brad Fitzpatrick's avatar
    net/http: fix confusing shadowing in ProxyFromEnvironment · 5b0bf9db
    Brad Fitzpatrick authored
    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
    5b0bf9db
transport.go 26.5 KB