1
0
mirror of https://github.com/golang/go synced 2024-10-07 11:21:22 -06:00
go/src/pkg/net/url
Gustavo Niemeyer dafd9f0bfc net/url: cleaned up URL interface (v2)
Duplicated fields from URL were dropped so that its behavior
is simple and expected when being stringified and when being
operated by packages like http. Most of the preserved fields
are in unencoded form, except for RawQuery which continues to
exist and be more easily handled via url.Query().

The RawUserinfo field was also replaced since it wasn't practical
to use and had limitations when operating with empty usernames
and passwords which are allowed by the RFC. In its place the
Userinfo type was introduced and made accessible through the
url.User and url.UserPassword functions.

What was previous built as:

        url.URL{RawUserinfo: url.EncodeUserinfo("user", ""), ...}

Is now built as:

        url.URL{User: url.User("user"), ...}

R=rsc, bradfitz, gustavo
CC=golang-dev
https://golang.org/cl/5498076
2012-01-17 00:49:05 -02:00
..
Makefile renaming_1: hand-edited files for go 1 renaming 2011-11-08 15:38:47 -08:00
url_test.go net/url: cleaned up URL interface (v2) 2012-01-17 00:49:05 -02:00
url.go net/url: cleaned up URL interface (v2) 2012-01-17 00:49:05 -02:00