Skip to content

Commit

Permalink
Properly initialize dellComponent and dellComponentAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
splaspood committed Mar 13, 2024
1 parent 08f26ef commit 5049267
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func (cm *dellVendorConfig) FindComponent(fqdd string) (c *dellComponent) {
}
}

c.FQDD = fqdd
c = &dellComponent{
XMLName: xml.Name{},
FQDD: fqdd,
Attributes: []*dellComponentAttribute{},
}

cm.ConfigData.SystemConfiguration.Components = append(cm.ConfigData.SystemConfiguration.Components, c)

Expand All @@ -80,7 +84,9 @@ func (cm *dellVendorConfig) FindComponentAttribute(c *dellComponent, name string
}
}

a.Name = name
a = &dellComponentAttribute{
Name: name,
}

c.Attributes = append(c.Attributes, a)

Expand Down

0 comments on commit 5049267

Please sign in to comment.