From 816bb5df1d112f54fdbec792d7b5e4a057ed11e7 Mon Sep 17 00:00:00 2001 From: an Date: Wed, 21 Feb 2018 21:39:01 +0100 Subject: [PATCH] Replace github.com/jteeuwen/... with own mirrors --- modules/rss.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/rss.go b/modules/rss.go index d0a756f..d2b12d5 100644 --- a/modules/rss.go +++ b/modules/rss.go @@ -15,10 +15,9 @@ import ( "os" "time" + "git.dnix.de/an/rss" "git.dnix.de/an/xlog" - - gorss "github.com/jteeuwen/go-pkg-rss" - "github.com/jteeuwen/go-pkg-xmlx" + "git.dnix.de/an/xmlx" ) var hideOutput = true @@ -54,7 +53,7 @@ func rssHandleMessage(m *Message) { } func rssPollFeed(uri string, timeout int, cr xmlx.CharsetFunc) { - feed := gorss.New(timeout, true, rssChanHandler, rssItemHandler) + feed := rss.New(timeout, true, rssChanHandler, rssItemHandler) for { xlog.Info("Polling feed: %s", uri) if err := feed.Fetch(uri, cr); err != nil { @@ -66,11 +65,11 @@ func rssPollFeed(uri string, timeout int, cr xmlx.CharsetFunc) { } } -func rssChanHandler(feed *gorss.Feed, newchannels []*gorss.Channel) { +func rssChanHandler(feed *rss.Feed, newchannels []*rss.Channel) { //SayCh <- fmt.Sprintf("%s\n[RSS] %d new channel(s) in %s", "*", len(newchannels), feed.Url) } -func rssItemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) { +func rssItemHandler(feed *rss.Feed, ch *rss.Channel, newitems []*rss.Item) { if hideOutput { return }