Rename id in Delete methods to index
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user