From 5049267446ba37af19ccb01d602ddfb7b82458bb Mon Sep 17 00:00:00 2001 From: "James W. Brinkerhoff" Date: Wed, 13 Mar 2024 12:09:30 -0400 Subject: [PATCH] Properly initialize dellComponent and dellComponentAttribute --- config/dell.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/dell.go b/config/dell.go index 26d735a..99d7947 100644 --- a/config/dell.go +++ b/config/dell.go @@ -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) @@ -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)