From 11a3986e64d9f77a93ebfb9701b532ecf7ba16dd Mon Sep 17 00:00:00 2001 From: jim teeuwen Date: Wed, 29 Feb 2012 11:34:19 +0100 Subject: [PATCH] Fix example program. --- examples/example.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/example.go b/examples/example.go index bb174d3..57bc772 100644 --- a/examples/example.go +++ b/examples/example.go @@ -21,19 +21,19 @@ func main() { // This sets up a new feed and polls it for new channels/items. // Invoke it with 'go PollFeed(...)' to have the polling performed in a // separate goroutine, so you can continue with the rest of your program. - PollFeed("http://cyber.law.harvard.edu/rss/examples/sampleRss091.xml", 5) + PollFeed("http://blog.case.edu/news/feed.atom", 5) } func PollFeed(uri string, timeout int) { feed := rss.New(timeout, true, chanHandler, itemHandler) for { - if err := feed.Fetch(uri); err != nil { + if err := feed.Fetch(uri, nil); err != nil { fmt.Fprintf(os.Stderr, "[e] %s: %s", uri, err) return } - <-time.After(feed.SecondsTillUpdate() * 1e9) + <-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9)) } }