diff options
| author | Sean Liao <sean@liao.dev> | 2024-10-20 10:46:03 +0100 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-10-21 15:18:09 +0000 |
| commit | e3d372aea86df4b3a848c0c454b364febca825d6 (patch) | |
| tree | 78cec6ac748a89542bc3ef5ea6d81a96c9889982 /src/encoding | |
| parent | 721c04ae4ef8406f169f7e32d131a8667fc75a33 (diff) | |
| download | go-e3d372aea86df4b3a848c0c454b364febca825d6.tar.xz | |
encoding/xml: document that embedded interfaces look like non-embedded ones
Fixes #69941
Change-Id: Icc3c88d57c14fa9ca203c693d67f144686fed8cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/621076
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/encoding')
| -rw-r--r-- | src/encoding/xml/marshal.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/encoding/xml/marshal.go b/src/encoding/xml/marshal.go index 05b5542dfb..133503fa2d 100644 --- a/src/encoding/xml/marshal.go +++ b/src/encoding/xml/marshal.go @@ -62,6 +62,8 @@ const ( // string of length zero. // - an anonymous struct field is handled as if the fields of its // value were part of the outer struct. +// - an anonymous struct field of interface type is treated the same as having +// that type as its name, rather than being anonymous. // - a field implementing [Marshaler] is written by calling its MarshalXML // method. // - a field implementing [encoding.TextMarshaler] is written by encoding the |
