From 64a2d6b58306c71c66199978d48b8c28f40d0ffb Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Tue, 15 Oct 2024 15:08:23 +0200 Subject: [PATCH] Check should not be called every time the feed is created because it can be costly --- feed.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/feed.go b/feed.go index b4463fd..c492c2c 100644 --- a/feed.go +++ b/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)