Missing handlers but there we goddamn GO
Former-commit-id: 2505146a54acaf18eadfdebf1dd2720889aef795
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package rss
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"local/rssmon3/config"
|
||||
"sort"
|
||||
|
||||
"github.com/gorilla/feeds"
|
||||
)
|
||||
@@ -29,6 +31,7 @@ func TaggedFeeds(tag string) ([]*Feed, error) {
|
||||
}
|
||||
|
||||
func WriteFeed(w io.Writer, tag string, items []*Item) error {
|
||||
sort.Sort(Items(items))
|
||||
feed := &feeds.Feed{
|
||||
Title: tag,
|
||||
Link: &feeds.Link{},
|
||||
@@ -47,6 +50,6 @@ func WriteFeed(w io.Writer, tag string, items []*Item) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.Write([]byte(s))
|
||||
fmt.Fprintf(w, "%s\n", s)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user