Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/xml: add omitempty tag attribute #2899
encoding/xml is missing omitempty (like encoding/json's). Without omitempty you are forced to use pointers to keep xml from writing out empty values; that is, you have to use *string instead of string. Because this constrains data layout (and makes common cases awkward), we should try to get omitempty in before Go 1. The definition of empty should be the same as in json.