From edd8a49e8f2c9dd1411913d22504c736dd0173f8 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Thu, 4 Apr 2024 16:52:53 +0200 Subject: [PATCH] Make encoding variable --- rss.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rss.go b/rss.go index da6cce5..506ddd3 100644 --- a/rss.go +++ b/rss.go @@ -229,7 +229,7 @@ func NewFeed() *Feed { } } -func (f *Feed) ToXML() (string, error) { +func (f *Feed) ToXML(encoding string) (string, error) { if err := f.check(); err != nil { return "", fmt.Errorf("error checking RSS feed: %v", err) } @@ -239,5 +239,5 @@ func (f *Feed) ToXML() (string, error) { return "", fmt.Errorf("error XML encoding feed: %v", err) } - return `` + string(xml), nil + return `` + string(xml), nil }