Add comment to alternateRelExists check

This commit is contained in:
Jason Streifling 2024-10-15 18:37:54 +02:00
parent f6bbc2fa6f
commit 4f3135dcc6

View File

@ -81,6 +81,9 @@ func (e *Entry) Check() error {
return fmt.Errorf("content element of entry %v: %v", e.ID.URI, err)
}
} else {
// atom:entry elements that contain no child atom:content element MUST
// contain at least one atom:link element with a rel attribute value of
// "alternate".
if !alternateRelExists(e.Links) {
return errors.New("no content element of entry %v and no link element with rel \"alternate\"")
}