• Dmitri Shuralyov's avatar
    net/http: remove parseURL variable · 3409ce39
    Dmitri Shuralyov authored
    The parseURL variable was introduced in CL 49930 in order to work
    around the fact that the name "url" was shadowed by a parameter of
    exported functions, and couldn't be renamed without sacrificing
    documentation readability. Documentation readability takes higher
    priority than internal implementation details.
    
    Back then, I considered renaming the net/url import but saw that it
    would be too disruptive of a change to the large net/http package.
    
    Now I see a better way: it's possible to import net/url both as url
    and as urlpkg (the package is still imported just once, but it becomes
    available via two names). This way we eliminate the need for wasting
    (a little) memory on the parseURL variable, improve code readability
    slightly, and delete some lines of code and comments.
    
    Updates #21077
    
    Change-Id: I42cd9833afdcf4a5f5874fb7ee9c8c11eae557dc
    Reviewed-on: https://go-review.googlesource.com/c/go/+/202482Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
    3409ce39
request.go 44.7 KB