Documentation ¶
Index ¶
- Constants
- Variables
- func CleanResponse(in string) string
- func HTTPClient() *http.Client
- func MatchesHosts(url *url.URL, hosts map[string]struct{}) (bool, string)
- func RequestGET(url string) (response *http.Response, err error)
- func RequestGETWithHeaders(url string, extraHeaders map[string]string) (response *http.Response, err error)
- type CustomURLManager
- type Response
- type WriteLimiter
Constants ¶
View Source
const (
MaxContentLength = 1024 * 1024 * 5 // 5MB
)
Variables ¶
View Source
var ( NoLinkInfoFound []byte InvalidURL []byte ResponseTooLarge []byte )
View Source
var (
ErrDontHandle = errors.New("dont handle in custom resolver")
)
View Source
var NoSpecialDur time.Duration
Functions ¶
func CleanResponse ¶
func HTTPClient ¶
Types ¶
type CustomURLManager ¶
type WriteLimiter ¶
type WriteLimiter struct { Limit uint64 // contains filtered or unexported fields }
WriteLimiter can limit how many bytes can be written before erroring out
Click to show internal directories.
Click to hide internal directories.