Life As A Software Engineer

XML omitempty with enclosed elements

omitempty is only used in marshalling. But it does not work with enclosed elements.

https://play.golang.org/p/DEgzD3rwhw

http://stackoverflow.com/questions/27246275/golang-hide-xml-parent-tag-if-empty


Share

comments powered by Disqus