atom/outOfLineContent.go

24 lines
500 B
Go
Raw Normal View History

2024-10-13 17:19:40 +02:00
package atomfeed
import "errors"
type OutOfLineContent struct {
*CommonAttributes
Type MediaType `xml:"type,attr,omitempty"`
SRC URI `xml:"src,attr"`
}
2024-10-15 19:32:14 +02:00
func (o *OutOfLineContent) isContent() bool { return true }
func (o *OutOfLineContent) hasSRC() bool { return true }
func (o *OutOfLineContent) getType() string { return string(o.Type) }
2024-10-13 17:19:40 +02:00
func (o *OutOfLineContent) Check() error {
if o.SRC == "" {
return errors.New("src attribute of out of line content empty")
}
return nil
}