This repository was archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnhc.go
More file actions
56 lines (51 loc) · 1.55 KB
/
Copy pathnhc.go
File metadata and controls
56 lines (51 loc) · 1.55 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import (
"encoding/xml"
)
type NHCData struct {
XMLName xml.Name `xml:"rss"`
Text string `xml:",chardata"`
Version string `xml:"version,attr"`
Dc string `xml:"dc,attr"`
Atom string `xml:"atom,attr"`
Channel NHCChannel `xml:"channel"`
}
type NHCChannel struct {
Text string `xml:",chardata"`
Link NHCLink `xml:"link"`
PubDate string `xml:"pubDate"`
LastBuildDate string `xml:"lastBuildDate"`
Title string `xml:"title"`
Description string `xml:"description"`
Copyright string `xml:"copyright"`
ManagingEditor string `xml:"managingEditor"`
Language string `xml:"language"`
WebMaster string `xml:"webMaster"`
Image NHCImage `xml:"image"`
Item []NHCItem `xml:"item"`
}
type NHCImage struct {
Text string `xml:",chardata"`
URL string `xml:"url"`
Link string `xml:"link"`
Title string `xml:"title"`
Description string `xml:"description"`
Width string `xml:"width"`
Height string `xml:"height"`
}
type NHCLink struct {
Text string `xml:",chardata"`
Href string `xml:"href,attr"`
Rel string `xml:"rel,attr"`
Type string `xml:"type,attr"`
}
type NHCItem struct {
Text string `xml:",chardata"`
Title string `xml:"title"`
Description string `xml:"description"`
PubDate string `xml:"pubDate"`
Link string `xml:"link"`
Guid string `xml:"guid"`
Author string `xml:"author"`
ValidAdvisory *string `xml:"validAdvisory"`
}