remove feedurls variable
parent
ce9960c06a
commit
d260db550d
17
main.go
17
main.go
|
@ -13,16 +13,10 @@ import (
|
||||||
"github.com/mmcdole/gofeed"
|
"github.com/mmcdole/gofeed"
|
||||||
)
|
)
|
||||||
|
|
||||||
var feedurls = []string{
|
|
||||||
"https://tilde.team/~dozens/dreams/rss.xml",
|
|
||||||
//"https://xkcd.com/atom.xml",
|
|
||||||
"https://tilde.town/~magical/xkcd.xml",
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var sources = make([]*FeedSource, len(feedurls)) // TODO: interface Source
|
var sources = []*FeedSource{ // TODO: interface Source
|
||||||
for i, u := range feedurls {
|
NewFeed("https://tilde.team/~dozens/dreams/rss.xml"),
|
||||||
sources[i] = NewFeed(u)
|
NewFeed("https://tilde.town/~magical/xkcd.xml"), // "https://xkcd.com/atom.xml",
|
||||||
}
|
}
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
@ -39,11 +33,6 @@ func main() {
|
||||||
for _, src := range sources {
|
for _, src := range sources {
|
||||||
fmt.Println(src.Title, src.Error)
|
fmt.Println(src.Title, src.Error)
|
||||||
}
|
}
|
||||||
//var feeds []*gofeed.Feed
|
|
||||||
//var errors []error
|
|
||||||
|
|
||||||
//for _, url := range feedUrls {
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Source interface {
|
type Source interface {
|
||||||
|
|
Loading…
Reference in New Issue