Adapt comments in feed.go and and entry.go

This commit is contained in:
Jason Streifling 2024-10-15 18:04:03 +02:00
parent 4d35873625
commit c5783268f8
2 changed files with 7 additions and 3 deletions

View File

@ -6,6 +6,10 @@ import (
"fmt" "fmt"
) )
// It is advisable that each atom:entry element contain a non-empty atom:title
// element, a non-empty atom:content element when that element is present, and
// a non-empty atom:summary element when the entry contains no atom:content
// element.
type Entry struct { type Entry struct {
*CommonAttributes *CommonAttributes
Authors []*Person `xml:"author,omitempty"` Authors []*Person `xml:"author,omitempty"`

View File

@ -26,9 +26,9 @@ type Feed struct {
Entries []*Entry `xml:"entry,omitempty"` Entries []*Entry `xml:"entry,omitempty"`
} }
// atom:feed elements MUST NOT contain more than one atom:link // atom:feed elements MUST NOT contain more than one atom:link element with a
// element with a rel attribute value of "alternate" that has the // rel attribute value of "alternate" that has the same combination of type and
// same combination of type and hreflang attribute values. // hreflang attribute values.
func hasAlternateDuplicateLinks(l []*Link) bool { func hasAlternateDuplicateLinks(l []*Link) bool {
linkMap := make(map[string]bool) linkMap := make(map[string]bool)