Various fixes

This commit is contained in:
rcorniere
2020-01-31 15:17:59 +01:00
parent 928c1595ef
commit 2083cbf29c
8 changed files with 50 additions and 93 deletions
+7 -6
View File
@@ -119,26 +119,27 @@ func (c *Command) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
case "affiliations":
a := Actions{}
d.DecodeElement(&a, &tt)
err = d.DecodeElement(&a, &tt)
c.CommandElement = &a
case "configure":
nt := Note{}
d.DecodeElement(&nt, &tt)
err = d.DecodeElement(&nt, &tt)
c.CommandElement = &nt
case "x":
f := Form{}
d.DecodeElement(&f, &tt)
err = d.DecodeElement(&f, &tt)
c.CommandElement = &f
default:
n := Node{}
e := d.DecodeElement(&n, &tt)
_ = e
err = d.DecodeElement(&n, &tt)
c.CommandElement = &n
if err != nil {
return err
}
}
if err != nil {
return err
}
case xml.EndElement:
if tt == start.End() {
return nil