chore: fix lint issues

G601: Implicit memory aliasing in for loop. (gosec)

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-10-20 19:48:02 +02:00
parent d0d8bfbca4
commit dfb557b34f
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -121,7 +121,7 @@ func (mb mergedBodies) JustAttributes() (hcl.Attributes, hcl.Diagnostics) {
"Argument %q was already set at %s",
name, existing.NameRange.String(),
),
Subject: &attr.NameRange,
Subject: thisAttrs[name].NameRange.Ptr(),
})
}
attrs[name] = attr
@ -192,7 +192,7 @@ func (mb mergedBodies) mergedContent(schema *hcl.BodySchema, partial bool) (*hcl
"Argument %q was already set at %s",
name, existing.NameRange.String(),
),
Subject: &attr.NameRange,
Subject: thisContent.Attributes[name].NameRange.Ptr(),
})
}
content.Attributes[name] = attr