https://play.golang.org/p/aMtZhha073
On Thursday, December 8, 2016 at 10:09:17 AM UTC-7, Peter Kleiweg wrote: > > Four years later, and this still hasn't been fixed. The conversation you > are linking to has been locked. What can we do? File a new bug report? > > > Op donderdag 15 november 2012 13:41:55 UTC+1 schreef Vladimir Mihailenco: >> >> I guess you have to vote for >> http://code.google.com/p/go/issues/detail?id=4168 . >> >> For now I do post processing like replace("<Tasks></Tasks>", ""), because >> xml schema validators does not accept such constructs. >> >> >> On Thu, Nov 15, 2012 at 1:49 PM, OmarShariffDontLikeIt < >> omarsharif...@gmail.com> wrote: >> >>> http://play.golang.org/p/E65WSpB8BY >>> >>> How can I Marshal an instance of the above structure and have the >>> "<Tasks>" element omited if it contains no items in the array? I want >>> the following output: >>> >>> <Project><Name>My Project</Name></Project> >>> >>> Any suggestions? >>> >>> Cheers, >>> Ben >>> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.