Documentation
¶
Overview ¶
Package getter defines an interface that is used to request results by URL
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
Get(ctx context.Context, url string) chan Result // Get returns a channel. Later it sends the response, and closes the channel.
}
Interface is used to request results by URL
type Result ¶
type Result struct { Code int // The http status code Body io.ReadCloser // The body - remember the caller of Get is responsible for closing this. HTML bool // Did the content-type header indicates HTML? Err error // Any error (all other fields will be zero if Err != nil) }
Result is the result of a Get
Directories
¶
Path | Synopsis |
---|---|
Package mockgetter defines a getter.Interface that returns mock results for use in tests
|
Package mockgetter defines a getter.Interface that returns mock results for use in tests |
Package webgetter defines a getter.Interface that gets real results by HTTP
|
Package webgetter defines a getter.Interface that gets real results by HTTP |
Click to show internal directories.
Click to hide internal directories.