Skip to content

Commit

Permalink
Update xml.go
Browse files Browse the repository at this point in the history
fix issue96
  • Loading branch information
clbanning committed Jun 3, 2022
1 parent 819e2c4 commit 39aa9a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xml.go
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,12 @@ func marshalMapToXmlIndent(doIndent bool, b *bytes.Buffer, key string, value int

// start the XML tag with required indentaton and padding
if doIndent {
if _, err = b.WriteString(p.padding); err != nil {
return err
switch value.(type) {
case []interface{}, []string:
default:
if _, err = b.WriteString(p.padding); err != nil {
return err
}
}
}
switch value.(type) {
Expand Down

0 comments on commit 39aa9a4

Please sign in to comment.