Documentation ¶
Index ¶
Constants ¶
View Source
const (
// URL is the URL from which all information is fetched.
URL = "http://www.drudgereport.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { // Headline is the text used for the link to the article on Drudge // Report. It is likely not the article's actual headline. Headline string // URL is the URL of the article as linked to by Drudge Report. URL *url.URL // Image is the image associated with the article, if there is one. Image *url.URL }
Article holds information about an article.
type Client ¶
type Client struct { // Client is the http.Client to use for fetching data. Client http.Client // contains filtered or unexported fields }
Client is used for getting data from Drudge Report. It is safe for concurrent use. The zero value of client is ready to use.
A Client caches the parsed HTML data that is fetched from Drudge Report. This cache is refreshed if at least an hour has passed since the last update to the cache.
Click to show internal directories.
Click to hide internal directories.