Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoundTripper ¶
NewRoundTripper returns a new RoundTripper which will call the provided function.
Types ¶
type MockTransport ¶
type MockTransport struct { // RT is the RoundTrip function. Replace this function with your test function. // For example: // t := MockTransport{} // t.RT = func(req *http.Request) (*http.Response, error) { // // assert req args, return res or error // } RT func(*http.Request) (*http.Response, error) }
MockTransport implements RoundTripper
Click to show internal directories.
Click to hide internal directories.