summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-07-10 19:03:14 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-07-10 19:03:14 +0200
commit69123dd8d871463de4f90d0e99c3d864d65dae5f (patch)
tree5dd4a24eeac7fd3d1593491a76e0cfaf0171ff57
parent2f628f1139b6f55b4a401a59d5f6b84295af8785 (diff)
Make lint happy
-rw-r--r--rss.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/rss.go b/rss.go
index 02388ef..1a45fae 100644
--- a/rss.go
+++ b/rss.go
@@ -1,3 +1,4 @@
+// Package rss implements RSS fetcher
package rss
import (
@@ -6,11 +7,13 @@ import (
"net/http"
)
+// RSS container
type RSS struct {
Version string `xml:"version,attr"`
Channel Channel `xml:"channel"`
}
+// Channel container
type Channel struct {
Link string `xml:"link"`
Language string `xml:"language"`
@@ -20,6 +23,7 @@ type Channel struct {
Items []Item `xml:"item"`
}
+// Item container
type Item struct {
Author string `xml:"author"`
Link string `xml:"link"`
@@ -28,6 +32,7 @@ type Item struct {
PubDate string `xml:"pubDate"`
}
+// Fetch and parse RSS from given URL
func Fetch(url string) (rss RSS, err error) {
resp, err := http.Get(url)
if err != nil {