Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Set the User-Agent string to be used for underlying requests to fetch feeds and content. UserAgent = config.AppName + "/" + config.Version + " (+https://foragd.app/policies/bot)" // DefaultHTTPRequestTimeout is the maximum time allowed for a background HTTP request to execute. DefaultHTTPRequestTimeout = 45 * time.Second // DefaultRequestRetries is the default number of retries for API requests. DefaultRequestRetries = 3 )
Functions ¶
This section is empty.
Types ¶
type HeadReader ¶
type HeadReader struct {
// contains filtered or unexported fields
}
limitedReader wraps a reader and stops after the </head> tag or a byte limit. This avoids downloading the entire page body.
func NewHeadReader ¶
func NewHeadReader(r io.Reader, maxBytes int) *HeadReader
Click to show internal directories.
Click to hide internal directories.