atom/commonAttributes.go

20 lines
488 B
Go
Raw Normal View History

2024-10-13 17:19:40 +02:00
package atomfeed
import "fmt"
type CommonAttributes struct {
Base IRI `xml:"base,attr,omitempty"`
2024-10-13 17:19:40 +02:00
Lang LanguageTag `xml:"lang,attr,omitempty"`
UndefinedAttributes []*ExtensionAttribute `xml:",any"`
}
func (c *CommonAttributes) Check() error {
for i, e := range c.UndefinedAttributes {
if err := e.Check(); err != nil {
return fmt.Errorf("extension attribute %v of common attributes: %v", i, err)
}
}
return nil
}