From 1dc587881870657be16b2675ee4a02b46e1e1e9a Mon Sep 17 00:00:00 2001 From: Charles Banning Date: Fri, 3 Feb 2017 15:42:17 -0700 Subject: [PATCH] Apply nil encoding patch from clbanning/mxj. --- xml.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xml.go b/xml.go index 2abb039..b96b65e 100644 --- a/xml.go +++ b/xml.go @@ -288,7 +288,11 @@ func mapToXmlIndent(doIndent bool, s *string, key string, value interface{}, pp return nil case nil: // terminate the tag + if doIndent { + *s += p.padding + } *s += "<" + key + endTag, isSimple = true, true break default: // handle anything - even goofy stuff elen = 0