forked from emmaly/go-pkg-rss
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathchannel.go
40 lines (37 loc) · 750 Bytes
/
channel.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package feeder
type Channel struct {
Title string
Links []Link
Description string
Language string
Copyright string
ManagingEditor string
WebMaster string
PubDate string
LastBuildDate string
Docs string
Categories []*Category
Generator Generator
TTL int
Rating string
SkipHours []int
SkipDays []int
Image Image
Items []*Item
Cloud Cloud
TextInput Input
Extensions map[string]map[string][]Extension
// Atom fields
Id string
Rights string
Author Author
SubTitle SubTitle
}
func (c *Channel) Key() string {
switch {
case len(c.Id) != 0:
return c.Id
default:
return c.Title
}
}