diff --git a/doc/go1.html b/doc/go1.html index 768c1ca6fa6..412f3a555b5 100644 --- a/doc/go1.html +++ b/doc/go1.html @@ -1455,12 +1455,12 @@ or panic should be updated to use the new methods.

The url package

-In Go 1 several fields from the url.URL type +In Go 1 several fields from the url.URL type were removed or replaced.

-The String method now +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. @@ -1473,9 +1473,9 @@ 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 +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.

@@ -1510,7 +1510,7 @@ path for such URLs. In Go 1, the cited URL parses as:

-A new RequestURI method was +A new RequestURI method was added to URL.

@@ -1520,6 +1520,50 @@ 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.

+

The xml package

+ +

+In Go 1, the xml package +has been brought closer in design to the other marshaling packages such +as encoding/gob. +

+ +

+The old Parser type is renamed +Decoder and has a new +Decode method. An +Encoder type was also +introduced. +

+ +

+The functions Marshal +and Unmarshal +work with []byte values now. To work with streams, +use the new Encoder +and Decoder types. +

+ +

+When marshaling or unmarshaling values, the format of supported flags in +field tags has changed to be closer to the +json package +(`xml:"name,flag"`). The matching done between field tags, field +names, and the XML attribute and element names is now case-sensitive. +The XMLName field tag, if present, must also match the name +of the XML element being marshaled. +

+ +

+Updating: +Gofix will update most uses of the package except for some calls to +Unmarshal. Special care must be taken with field tags, +since gofix will not update them and if not fixed by hand they will +misbehave silently in some cases. For example, the old +"attr" is now written ",attr" while plain +"attr" remains valid but with a different meaning. +

+

The go command

Packaged releases

diff --git a/doc/go1.tmpl b/doc/go1.tmpl index e0a443dc2c6..5fc67724a38 100644 --- a/doc/go1.tmpl +++ b/doc/go1.tmpl @@ -1345,12 +1345,12 @@ or panic should be updated to use the new methods.

The url package

-In Go 1 several fields from the url.URL type +In Go 1 several fields from the url.URL type were removed or replaced.

-The String method now +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. @@ -1363,9 +1363,9 @@ 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 +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.

@@ -1400,7 +1400,7 @@ path for such URLs. In Go 1, the cited URL parses as:

-A new RequestURI method was +A new RequestURI method was added to URL.

@@ -1410,6 +1410,50 @@ 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.

+

The xml package

+ +

+In Go 1, the xml package +has been brought closer in design to the other marshaling packages such +as encoding/gob. +

+ +

+The old Parser type is renamed +Decoder and has a new +Decode method. An +Encoder type was also +introduced. +

+ +

+The functions Marshal +and Unmarshal +work with []byte values now. To work with streams, +use the new Encoder +and Decoder types. +

+ +

+When marshaling or unmarshaling values, the format of supported flags in +field tags has changed to be closer to the +json package +(`xml:"name,flag"`). The matching done between field tags, field +names, and the XML attribute and element names is now case-sensitive. +The XMLName field tag, if present, must also match the name +of the XML element being marshaled. +

+ +

+Updating: +Gofix will update most uses of the package except for some calls to +Unmarshal. Special care must be taken with field tags, +since gofix will not update them and if not fixed by hand they will +misbehave silently in some cases. For example, the old +"attr" is now written ",attr" while plain +"attr" remains valid but with a different meaning. +

+

The go command

Packaged releases