Check should not be called every time the feed is created because it can be costly
This commit is contained in:
parent
83962a0341
commit
64a2d6b583
4
feed.go
4
feed.go
@ -161,10 +161,6 @@ func (f *Feed) AddExtension(name string, value any) {
|
||||
}
|
||||
|
||||
func (f *Feed) ToXML(encoding string) (string, error) {
|
||||
if err := f.Check(); err != nil {
|
||||
return "", fmt.Errorf("error checking feed: %v", err)
|
||||
}
|
||||
|
||||
xml, err := xml.MarshalIndent(f, "", " ")
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error xml encoding feed: %v", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user