First implementation of an atom feed
This commit is contained in:
19
outOfLineContent.go
Normal file
19
outOfLineContent.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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) Check() error {
|
||||
if o.SRC == "" {
|
||||
return errors.New("src attribute of out of line content empty")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user