aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/xml')
-rw-r--r--src/encoding/xml/marshal.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go
index 42133a75ab..37b0dcb3c9 100644
--- a/src/encoding/xml/marshal.go
+++ b/src/encoding/xml/marshal.go
@@ -67,6 +67,9 @@ const (
// parent elements a and b. Fields that appear next to each other that name
// the same parent will be enclosed in one XML element.
//
+// If the XML name for a struct field is defined by both the field tag and the
+// struct's XMLName field, the names must match.
+//
// See MarshalIndent for an example.
//
// Marshal will return an error if asked to marshal a channel, function, or map.