1package internal
2
3import "strings"
4
5func cleanupCircuit(c *xmlCircuit) {
6 for i := range c.Components {
7 c.Components[i].DefinitionID = strings.Trim(c.Components[i].DefinitionID, "{}")
8 c.Components[i].Props = nonemptyProps(c.Components[i].Props)
9 }
10}
11
12func nonemptyProps(props []xmlProp) []xmlProp {
13 var out []xmlProp
14 for _, p := range props {
15 if p.Value != "" {
16 out = append(out, p)
17 }
18 }
19 return out
20}