Rename id in Delete methods to index

This commit is contained in:
2024-10-20 12:35:26 +02:00
parent b6b8970810
commit bcf2532372
6 changed files with 58 additions and 58 deletions

View File

@@ -24,9 +24,9 @@ func (c *CommonAttributes) AddAttribute(name, value string) {
// DeleteAttribute deletes the attribute from the CommonAttributes. It return an
// error.
func (c *CommonAttributes) DeleteAttribute(id int) error {
if err := deleteFromSlice(&c.UndefinedAttributes, id); err != nil {
return fmt.Errorf("error deleting undefined attribute %v from common attributes %v: %v", id, c, err)
func (c *CommonAttributes) DeleteAttribute(index int) error {
if err := deleteFromSlice(&c.UndefinedAttributes, index); err != nil {
return fmt.Errorf("error deleting undefined attribute %v from common attributes %v: %v", index, c, err)
}
return nil
}