mirror of
https://code.dnix.de/da/flokatirc
synced 2026-07-27 10:09:44 +02:00
Fixed a module name collision in rss mod.
This commit is contained in:
+5
-5
@@ -1,4 +1,4 @@
|
||||
// vim:ts=4:sts=4:sw=4:noet:tw=72
|
||||
// vi:ts=4:sts=4:sw=4:noet:tw=72
|
||||
//
|
||||
// This code is mostly derived from the example code by Jim Teeuwen
|
||||
// and is subject to the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
rss "github.com/jteeuwen/go-pkg-rss"
|
||||
gorss "github.com/jteeuwen/go-pkg-rss"
|
||||
"github.com/jteeuwen/go-pkg-xmlx"
|
||||
)
|
||||
|
||||
@@ -43,7 +43,7 @@ func Init(ch chan string, path string) {
|
||||
}
|
||||
|
||||
func PollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
|
||||
feed := rss.New(timeout, true, chanHandler, itemHandler)
|
||||
feed := gorss.New(timeout, true, chanHandler, itemHandler)
|
||||
for {
|
||||
log.Printf("Polling feed: %s", uri)
|
||||
if err := feed.Fetch(uri, cr); err != nil {
|
||||
@@ -55,11 +55,11 @@ func PollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
|
||||
}
|
||||
}
|
||||
|
||||
func chanHandler(feed *rss.Feed, newchannels []*rss.Channel) {
|
||||
func chanHandler(feed *gorss.Feed, newchannels []*gorss.Channel) {
|
||||
//sayCh <- fmt.Sprintf("%s\n%d new channel(s) in %s", "*", len(newchannels), feed.Url)
|
||||
}
|
||||
|
||||
func itemHandler(feed *rss.Feed, ch *rss.Channel, newitems []*rss.Item) {
|
||||
func itemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) {
|
||||
if hideOutput {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user