From d260db550d8ef8ed762d2eb6c7f7d3db703d1ee2 Mon Sep 17 00:00:00 2001 From: magical Date: Fri, 31 Dec 2021 06:20:09 +0000 Subject: [PATCH] remove feedurls variable --- main.go | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/main.go b/main.go index b769e49..02ad8cc 100644 --- a/main.go +++ b/main.go @@ -13,16 +13,10 @@ import ( "github.com/mmcdole/gofeed" ) -var feedurls = []string{ - "https://tilde.team/~dozens/dreams/rss.xml", - //"https://xkcd.com/atom.xml", - "https://tilde.town/~magical/xkcd.xml", -} - func main() { - var sources = make([]*FeedSource, len(feedurls)) // TODO: interface Source - for i, u := range feedurls { - sources[i] = NewFeed(u) + var sources = []*FeedSource{ // TODO: interface Source + NewFeed("https://tilde.team/~dozens/dreams/rss.xml"), + NewFeed("https://tilde.town/~magical/xkcd.xml"), // "https://xkcd.com/atom.xml", } var wg sync.WaitGroup @@ -39,11 +33,6 @@ func main() { for _, src := range sources { fmt.Println(src.Title, src.Error) } - //var feeds []*gofeed.Feed - //var errors []error - - //for _, url := range feedUrls { - //} } type Source interface {