Clarified Add method's comments

This commit is contained in:
2024-10-20 14:31:54 +02:00
parent 8ce7d54d00
commit ae24db0c08
5 changed files with 28 additions and 21 deletions

View File

@@ -17,7 +17,8 @@ func newCommonAttributes() *CommonAttributes {
return new(CommonAttributes)
}
// AddAttribute adds the attribute to the CommonAttributes. It returns an int.
// AddAttribute adds the attribute to the CommonAttributes. It returns its index
// as an int.
func (c *CommonAttributes) AddAttribute(name, value string) int {
return addToSlice(&c.UndefinedAttributes, &xml.Attr{Name: xml.Name{Local: name}, Value: value})
}