diff --git a/commonAttributes.go b/commonAttributes.go index 8035734..48f6bf9 100644 --- a/commonAttributes.go +++ b/commonAttributes.go @@ -22,8 +22,8 @@ func (c *CommonAttributes) AddAttribute(name, value string) { addToSlice(&c.UndefinedAttributes, &xml.Attr{Name: xml.Name{Local: name}, Value: value}) } -// DeleteAttribute deletes the attribute from the CommonAttributes. It return an -// error. +// DeleteAttribute deletes the attribute at index from the CommonAttributes. It +// return an error. 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) diff --git a/entry.go b/entry.go index 67ccd7b..5cc30ce 100644 --- a/entry.go +++ b/entry.go @@ -72,7 +72,7 @@ func (e *Entry) AddAuthor(p *Person) { e.Updated = NewDate(time.Now()) } -// DeleteAuthor deletes the Person from the Entry. It return an error. +// DeleteAuthor deletes the Person at index from the Entry. It return an error. func (e *Entry) DeleteAuthor(index int) error { if err := deleteFromSlice(&e.Authors, index); err != nil { return fmt.Errorf("error deleting author %v from entry %v: %v", index, e.ID.URI, err) @@ -88,7 +88,8 @@ func (e *Entry) AddCategory(c *Category) { e.Updated = NewDate(time.Now()) } -// DeleteCategory deletes the Category from the Entry. It return an error. +// DeleteCategory deletes the Category at index from the Entry. It return an +// error. func (e *Entry) DeleteCategory(index int) error { if err := deleteFromSlice(&e.Categories, index); err != nil { return fmt.Errorf("error deleting category %v from entry %v: %v", index, e.ID.URI, err) @@ -104,7 +105,8 @@ func (e *Entry) AddContributor(c *Person) { e.Updated = NewDate(time.Now()) } -// DeleteContributor deletes the Person from the Entry. It return an error. +// DeleteContributor deletes the Person at index from the Entry. It return an +// error. func (e *Entry) DeleteContributor(index int) error { if err := deleteFromSlice(&e.Contributors, index); err != nil { return fmt.Errorf("error deleting contributor %v from entry %v: %v", index, e.ID.URI, err) @@ -120,7 +122,7 @@ func (e *Entry) AddLink(l *Link) { e.Updated = NewDate(time.Now()) } -// DeleteLink deletes the Link from the Entry. It return an error. +// DeleteLink deletes the Link at index from the Entry. It return an error. func (e *Entry) DeleteLink(index int) error { if err := deleteFromSlice(&e.Links, index); err != nil { return fmt.Errorf("error deleting link %v from entry %v: %v", index, e.ID.URI, err) @@ -136,7 +138,8 @@ func (e *Entry) AddExtension(x *ExtensionElement) { e.Updated = NewDate(time.Now()) } -// DeleteExtension deletes the Extension from the Entry. It return an error. +// DeleteExtension deletes the Extension at index from the Entry. It return an +// error. func (e *Entry) DeleteExtension(index int) error { if err := deleteFromSlice(&e.Extensions, index); err != nil { return fmt.Errorf("error deleting extension %v from entry %v: %v", index, e.ID.URI, err) diff --git a/feed.go b/feed.go index 08851d2..c587420 100644 --- a/feed.go +++ b/feed.go @@ -41,7 +41,7 @@ func (f *Feed) AddAuthor(p *Person) { f.Updated = NewDate(time.Now()) } -// DeleteAuthor deletes the Person from the Feed. It return an error. +// DeleteAuthor deletes the Person at index from the Feed. It return an error. func (f *Feed) DeleteAuthor(index int) error { if err := deleteFromSlice(&f.Authors, index); err != nil { return fmt.Errorf("error deleting author %v from entry %v: %v", index, f.ID.URI, err) @@ -57,7 +57,8 @@ func (f *Feed) AddCategory(c *Category) { f.Updated = NewDate(time.Now()) } -// DeleteCategory deletes the Category from the Feed. It return an error. +// DeleteCategory deletes the Category at index from the Feed. It return an +// error. func (f *Feed) DeleteCategory(index int) error { if err := deleteFromSlice(&f.Categories, index); err != nil { return fmt.Errorf("error deleting category %v from entry %v: %v", index, f.ID.URI, err) @@ -73,7 +74,8 @@ func (f *Feed) AddContributor(c *Person) { f.Updated = NewDate(time.Now()) } -// DeleteContributor deletes the Person from the Feed. It return an error. +// DeleteContributor deletes the Person at index from the Feed. It return an +// error. func (f *Feed) DeleteContributor(index int) error { if err := deleteFromSlice(&f.Contributors, index); err != nil { return fmt.Errorf("error deleting contributor %v from entry %v: %v", index, f.ID.URI, err) @@ -89,7 +91,7 @@ func (f *Feed) AddLink(l *Link) { f.Updated = NewDate(time.Now()) } -// DeleteLink deletes the Link from the Feed. It return an error. +// DeleteLink deletes the Link at index from the Feed. It return an error. func (f *Feed) DeleteLink(index int) error { if err := deleteFromSlice(&f.Links, index); err != nil { return fmt.Errorf("error deleting link %v from entry %v: %v", index, f.ID.URI, err) @@ -105,7 +107,8 @@ func (f *Feed) AddExtension(e *ExtensionElement) { f.Updated = NewDate(time.Now()) } -// DeleteExtension deletes the Extension from the Feed. It return an error. +// DeleteExtension deletes the Extension at index from the Feed. It return an +// error. func (f *Feed) DeleteExtension(index int) error { if err := deleteFromSlice(&f.Extensions, index); err != nil { return fmt.Errorf("error deleting extension %v from entry %v: %v", index, f.ID.URI, err) @@ -121,7 +124,7 @@ func (f *Feed) AddEntry(e *Entry) { f.Updated = NewDate(time.Now()) } -// DeleteEntry deletes the Entry from the Feed. It return an error. +// DeleteEntry deletes the Entry at index from the Feed. It return an error. func (f *Feed) DeleteEntry(index int) error { if err := deleteFromSlice(&f.Entries, index); err != nil { return fmt.Errorf("error deleting entry %v from entry %v: %v", index, f.ID.URI, err) diff --git a/person.go b/person.go index d2a0d68..b0f82f5 100644 --- a/person.go +++ b/person.go @@ -26,7 +26,8 @@ func (p *Person) AddExtension(e *ExtensionElement) { addToSlice(&p.Extensions, e) } -// DeleteExtension deletes the Extension from the Person. It return an error. +// DeleteExtension deletes the Extension at index from the Person. It return an +// error. func (p *Person) DeleteExtension(index int) error { if err := deleteFromSlice(&p.Extensions, index); err != nil { return fmt.Errorf("error deleting extension %v from person %v: %v", index, p, err) diff --git a/source.go b/source.go index cb2419b..71ef099 100644 --- a/source.go +++ b/source.go @@ -33,7 +33,7 @@ func (s *Source) AddAuthor(p *Person) { addToSlice(&s.Authors, p) } -// DeleteAuthor deletes the Person from the Source. It return an error. +// DeleteAuthor deletes the Person at index from the Source. It return an error. func (s *Source) DeleteAuthor(index int) error { if err := deleteFromSlice(&s.Authors, index); err != nil { return fmt.Errorf("error deleting author %v from source %v: %v", index, s, err) @@ -46,7 +46,8 @@ func (s *Source) AddCategory(c *Category) { addToSlice(&s.Categories, c) } -// DeleteCategory deletes the Category from the Source. It return an error. +// DeleteCategory deletes the Category at index from the Source. It return an +// error. func (s *Source) DeleteCategory(index int) error { if err := deleteFromSlice(&s.Categories, index); err != nil { return fmt.Errorf("error deleting category %v from source %v: %v", index, s, err) @@ -59,7 +60,8 @@ func (s *Source) AddContributor(c *Person) { addToSlice(&s.Contributors, c) } -// DeleteContributor deletes the Person from the Source. It return an error. +// DeleteContributor deletes the Person at index from the Source. It return an +// error. func (s *Source) DeleteContributor(index int) error { if err := deleteFromSlice(&s.Contributors, index); err != nil { return fmt.Errorf("error deleting contributor %v from source %v: %v", index, s, err) @@ -72,7 +74,7 @@ func (s *Source) AddLink(l *Link) { addToSlice(&s.Links, l) } -// DeleteLink deletes the Link from the Source. It return an error. +// DeleteLink deletes the Link at index from the Source. It return an error. func (s *Source) DeleteLink(index int) error { if err := deleteFromSlice(&s.Links, index); err != nil { return fmt.Errorf("error deleting link %v from source %v: %v", index, s, err) @@ -85,7 +87,8 @@ func (s *Source) AddExtension(e *ExtensionElement) { addToSlice(&s.Extensions, e) } -// DeleteExtension deletes the Extension from the Source. It return an error. +// DeleteExtension deletes the Extension at index from the Source. It return an +// error. func (s *Source) DeleteExtension(index int) error { if err := deleteFromSlice(&s.Extensions, index); err != nil { return fmt.Errorf("error deleting extension %v from source %v: %v", index, s, err)