]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: add support for the omitempty flag
authorGustavo Niemeyer <gustavo@niemeyer.net>
Wed, 8 Feb 2012 03:57:44 +0000 (01:57 -0200)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Wed, 8 Feb 2012 03:57:44 +0000 (01:57 -0200)
commit0a7ad329e17331a0ca4776b6b9ac67dfc32ad24d
tree7395c3a9d3c0cbafc2a160e43af4c2689a211202
parent63975807c92568f0f769eda01019dbf1ffbc933f
encoding/xml: add support for the omitempty flag

This also changes the behavior of attribute marshalling so
that strings and byte slices are marshalled even if empty.
The omitempty flag may be used to obtain the previous behavior.

Fixes #2899.

R=rsc
CC=golang-dev
https://golang.org/cl/5645050
src/pkg/encoding/xml/marshal.go
src/pkg/encoding/xml/marshal_test.go
src/pkg/encoding/xml/read_test.go
src/pkg/encoding/xml/typeinfo.go