package atomfeed import "errors" type OutOfLineContent struct { *CommonAttributes Type MediaType `xml:"type,attr,omitempty"` SRC URI `xml:"src,attr"` } func (o *OutOfLineContent) isContent() bool { return true } func (o *OutOfLineContent) hasSRC() bool { return true } func (o *OutOfLineContent) getType() string { return string(o.Type) } func (o *OutOfLineContent) Check() error { if isCompositeMediaType(o.getType()) { return errors.New("type attribute of out of line content must not be a composite type") } if o.SRC == "" { return errors.New("src attribute of out of line content empty") } return nil }