]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: improve []byte handling
authorGustavo Niemeyer <gustavo@niemeyer.net>
Mon, 23 Jan 2012 02:50:05 +0000 (00:50 -0200)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Mon, 23 Jan 2012 02:50:05 +0000 (00:50 -0200)
commit57007fe12b59fdc61027e5f8cba17444485ca32f
tree0ee750086e28d034fb0c023eb1f42506b4760a43
parent9d47526585d7f15f7a3f22ef85ddc4a31c737e4f
encoding/xml: improve []byte handling

Marshalling of []byte in attributes and the general
marshalling of named []byte types was fixed.

A []byte field also won't be nil if an XML element
was mapped to it, even if the element is empty.

Tests were introduced to make sure that *struct{}
fields works correctly for element presence testing.
No changes to the logic made in that regard.

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