Documentation
¶
Index ¶
Constants ¶
const ( HeaderUserAgent = "User-Agent" HeaderAccept = "Accept" HeaderAcceptLang = "Accept-Language" HeaderAcceptEncode = "Accept-Encoding" HeaderCacheControl = "Cache-Control" HeaderReferer = "Referer" HeaderIfNoneMatch = "If-None-Match" HeaderIfModifiedSince = "If-Modified-Since" HeaderRFC3229 = "A-IM" HeaderETag = "ETag" HeaderLastModified = "Last-Modified" HeaderContentEncoding = "Content-Encoding" HeaderContentType = "Content-Type" )
Canonical names of headers used by the fetch package
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Document ¶
type HTMLFetcher ¶
type HTMLFetcher struct {
// contains filtered or unexported fields
}
HTMLFetcher is an interface for fetching the full HTML associated with a feed item
func NewHTMLFetcher ¶
func NewHTMLFetcher(url string) *HTMLFetcher
NewHTMLFetcher creates a new HTML fetcher that can fetch the full HTML from the specified URL.
type HTTPError ¶
HTTPError contains status information from the request and can be returned as error. This type of error is returned from the Fetcher when the server replies successfully but without a 200 status. The suggested use of this error is in a switch statement, e.g. something like: switch he := err.(type) {case fetch.HTTPError: ... default: ...}
func (HTTPError) Error ¶
Error implements the error interface and returns a string representation of the err.
func (HTTPError) NotModified ¶
NotModified returns true if the error is an HTTP 304
type IconFetcher ¶ added in v0.2.0
type IconFetcher struct {
HTMLFetcher
}
func NewIconFetcher ¶ added in v0.2.0
func NewIconFetcher(url string) *IconFetcher