diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-03-16 10:31:57 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-03-16 13:52:32 -0700 |
commit | 69921f4a7ec081c5b37dae13e3372003e4efd49f (patch) | |
tree | 3c485503e44039e60d49bc2450e9a28153496706 /libgo/go/encoding/xml/marshal.go | |
parent | 7fd6e36ea9aa8575841ff1da08b4aebc0298abe2 (diff) | |
download | gcc-69921f4a7ec081c5b37dae13e3372003e4efd49f.zip gcc-69921f4a7ec081c5b37dae13e3372003e4efd49f.tar.gz gcc-69921f4a7ec081c5b37dae13e3372003e4efd49f.tar.bz2 |
libgo: update to final Go 1.18 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/393377
Diffstat (limited to 'libgo/go/encoding/xml/marshal.go')
-rw-r--r-- | libgo/go/encoding/xml/marshal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/go/encoding/xml/marshal.go b/libgo/go/encoding/xml/marshal.go index 6859be0..7792ac7 100644 --- a/libgo/go/encoding/xml/marshal.go +++ b/libgo/go/encoding/xml/marshal.go @@ -512,7 +512,7 @@ func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplat } fv := finfo.value(val, dontInitNilPointers) - if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) { + if finfo.flags&fOmitEmpty != 0 && (!fv.IsValid() || isEmptyValue(fv)) { continue } |