1
0
mirror of https://github.com/golang/go synced 2024-11-06 13:46:16 -07:00
go/src/encoding/xml
hopehook 851ecea4cc encoding/xml: embedded reference to substruct causes XML marshaller to panic on encoding
When encoding a xml attribute is zero value (IsValid == false), we need
a `continue` to jump over the attribute. If not, followed marshalAttr
function will panic.

Fixes: #50164
Change-Id: I42e064558e7becfbf47728b14cbf5c7afa1e8798
Reviewed-on: https://go-review.googlesource.com/c/go/+/385514
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Trust: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-20 20:58:11 +00:00
..
atom_test.go
example_marshaling_test.go
example_test.go
example_text_marshaling_test.go
marshal_test.go encoding/xml: embedded reference to substruct causes XML marshaller to panic on encoding 2022-02-20 20:58:11 +00:00
marshal.go encoding/xml: embedded reference to substruct causes XML marshaller to panic on encoding 2022-02-20 20:58:11 +00:00
read_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
read.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
typeinfo.go all: use reflect.{Pointer,PointerTo} 2021-10-26 14:24:17 +00:00
xml_test.go
xml.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00