From f5b1056458f4492cde801134343fb6b9bfbf7eff Mon Sep 17 00:00:00 2001 From: Michael K Date: Fri, 28 Nov 2014 21:29:56 +0100 Subject: [PATCH 1/2] Added missing this --- feed.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feed.go b/feed.go index 2761deb..0d53d40 100644 --- a/feed.go +++ b/feed.go @@ -227,7 +227,7 @@ func (this *Feed) notifyListeners() { func (this *Feed) CanUpdate() bool { // Make sure we are not within the specified cache-limit. // This ensures we don't request data too often. - if SecondsTillUpdate() > 0 { + if this.SecondsTillUpdate() > 0 { return false } @@ -266,7 +266,7 @@ func (this *Feed) SecondsTillUpdate() int64 { // Returns the duration needed to elapse before the feed should update. func (this *Feed) TillUpdate() (time.Duration, error) { - return time.ParseDuration(fmt.Sprintf("%ds", SecondsTillUpdate())) + return time.ParseDuration(fmt.Sprintf("%ds", this.SecondsTillUpdate())) } func (this *Feed) buildFeed(doc *xmlx.Document) (err error) { From 07c9e4322a172070897f0d4db57b7bd07f8dd2e3 Mon Sep 17 00:00:00 2001 From: Michael K Date: Sat, 29 Nov 2014 01:19:55 +0100 Subject: [PATCH 2/2] Added comment --- feed.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/feed.go b/feed.go index 0d53d40..1425dfe 100644 --- a/feed.go +++ b/feed.go @@ -298,6 +298,8 @@ func (this *Feed) testVersions() bool { return true } +// Returns the type of the feed, ie. "atom" or "rss", and the version number as an array. +// The first item in the array is the major and the second the minor version number. func (this *Feed) GetVersionInfo(doc *xmlx.Document) (ftype string, fversion [2]int) { var node *xmlx.Node