First implementation of an atom feed
This commit is contained in:
18
generator.go
Normal file
18
generator.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package atomfeed
|
||||
|
||||
import "errors"
|
||||
|
||||
type Generator struct {
|
||||
*CommonAttributes
|
||||
URI URI `xml:"uri,attr,omitempty"`
|
||||
Version string `xml:"version,attr,omitempty"`
|
||||
Text string `xml:"text"`
|
||||
}
|
||||
|
||||
func (g *Generator) Check() error {
|
||||
if g.Text == "" {
|
||||
return errors.New("text element of generator empty")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user