From: Gustavo Niemeyer println
or panic
should be updated to use the new methods.
+In Go 1 several fields from the url.URL
type
+were removed or replaced.
+
+The String
method now
+predictably rebuilds an encoded URL string using all of URL
's
+fields as necessary. The resulting string will also no longer have
+passwords escaped.
+
+The Raw
field has been removed. In most cases the String
+method may be used in its place.
+
+The old RawUserinfo
field is replaced by the User
+field, of type *net.Userinfo
.
+Values of this type may be created using the new net.User
+and net.UserPassword
+functions. The EscapeUserinfo
and UnescapeUserinfo
+functions are also gone.
+
+The RawAuthority
field has been removed. The same information is
+available in the Host
and User
fields.
+
+The RawPath
field and the EncodedPath
method have
+been removed. The path information in rooted URLs (with a slash following the
+schema) is now available only in decoded form in the Path
field.
+Occasionally, the encoded data may be required to obtain information that
+was lost in the decoding process. These cases must be handled by accessing
+the data the URL was built from.
+
+URLs with non-rooted paths, such as "mailto:dev@golang.org?subject=Hi"
,
+are also handled differently. The OpaquePath
boolean field has been
+removed and a new Opaque
string field introduced to hold the encoded
+path for such URLs. In Go 1, the cited URL parses as:
+
+ URL{ + Scheme: "mailto", + Opaque: "dev@golang.org", + RawQuery: "subject=Hi", + } ++ +
+A new RequestURI
method was
+added to URL
.
+
+Updating: +Code that uses the old fields will fail to compile and must be updated by hand. +The semantic changes make it difficult for gofix to update automatically. +
+println
or panic
should be updated to use the new methods.
+
+In Go 1 several fields from the url.URL
type
+were removed or replaced.
+
+The String
method now
+predictably rebuilds an encoded URL string using all of URL
's
+fields as necessary. The resulting string will also no longer have
+passwords escaped.
+
+The Raw
field has been removed. In most cases the String
+method may be used in its place.
+
+The old RawUserinfo
field is replaced by the User
+field, of type *net.Userinfo
.
+Values of this type may be created using the new net.User
+and net.UserPassword
+functions. The EscapeUserinfo
and UnescapeUserinfo
+functions are also gone.
+
+The RawAuthority
field has been removed. The same information is
+available in the Host
and User
fields.
+
+The RawPath
field and the EncodedPath
method have
+been removed. The path information in rooted URLs (with a slash following the
+schema) is now available only in decoded form in the Path
field.
+Occasionally, the encoded data may be required to obtain information that
+was lost in the decoding process. These cases must be handled by accessing
+the data the URL was built from.
+
+URLs with non-rooted paths, such as "mailto:dev@golang.org?subject=Hi"
,
+are also handled differently. The OpaquePath
boolean field has been
+removed and a new Opaque
string field introduced to hold the encoded
+path for such URLs. In Go 1, the cited URL parses as:
+
+ URL{ + Scheme: "mailto", + Opaque: "dev@golang.org", + RawQuery: "subject=Hi", + } ++ +
+A new RequestURI
method was
+added to URL
.
+
+Updating: +Code that uses the old fields will fail to compile and must be updated by hand. +The semantic changes make it difficult for gofix to update automatically. +
+