aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2016-07-05 20:06:00 -0500
committerIan Lance Taylor <iant@golang.org>2016-07-06 17:19:45 +0000
commit820e30f5b0289d5df22ab604f2d831470f748dca (patch)
treee47c3e02f3e9873d46280ccfa725cccd4d2bce8f
parent5a9d5c37479231336efef0e0fa5b75645aa1c569 (diff)
downloadgo-820e30f5b0289d5df22ab604f2d831470f748dca.tar.gz
go-820e30f5b0289d5df22ab604f2d831470f748dca.zip
encoding/xml: update docs to follow convention
Fixes #8833 Change-Id: I4523a1de112ed02371504e27882659bce8028a45 Reviewed-on: https://go-review.googlesource.com/24745 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r--src/encoding/xml/marshal.go2
-rw-r--r--src/encoding/xml/read.go10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go
index 609c790520..abb078ce27 100644
--- a/src/encoding/xml/marshal.go
+++ b/src/encoding/xml/marshal.go
@@ -33,7 +33,7 @@ const (
//
// The name for the XML elements is taken from, in order of preference:
// - the tag on the XMLName field, if the data is a struct
-// - the value of the XMLName field of type xml.Name
+// - the value of the XMLName field of type Name
// - the tag of the struct field used to obtain the data
// - the name of the struct field used to obtain the data
// - the name of the marshalled type
diff --git a/src/encoding/xml/read.go b/src/encoding/xml/read.go
index ee725cb8bb..937432e3a7 100644
--- a/src/encoding/xml/read.go
+++ b/src/encoding/xml/read.go
@@ -39,7 +39,7 @@ import (
// ",innerxml", Unmarshal accumulates the raw XML nested inside the
// element in that field. The rest of the rules still apply.
//
-// * If the struct has a field named XMLName of type xml.Name,
+// * If the struct has a field named XMLName of type Name,
// Unmarshal records the element name in that field.
//
// * If the XMLName field has an associated tag of the form
@@ -105,8 +105,8 @@ import (
// interpreting the string value in decimal. There is no check for
// overflow.
//
-// Unmarshal maps an XML element to an xml.Name by recording the
-// element name.
+// Unmarshal maps an XML element to a Name by recording the element
+// name.
//
// Unmarshal maps an XML element to a pointer by setting the pointer
// to a freshly allocated value and then mapping the element to that value.
@@ -115,13 +115,13 @@ func Unmarshal(data []byte, v interface{}) error {
return NewDecoder(bytes.NewReader(data)).Decode(v)
}
-// Decode works like xml.Unmarshal, except it reads the decoder
+// Decode works like Unmarshal, except it reads the decoder
// stream to find the start element.
func (d *Decoder) Decode(v interface{}) error {
return d.DecodeElement(v, nil)
}
-// DecodeElement works like xml.Unmarshal except that it takes
+// DecodeElement works like Unmarshal except that it takes
// a pointer to the start XML element to decode into v.
// It is useful when a client reads some raw XML tokens itself
// but also wants to defer to Unmarshal for some elements.