14 lines
266 B
Go
14 lines
266 B
Go
package mock
|
|
|
|
import "net/http"
|
|
|
|
// Client is the mock client
|
|
type Client struct {
|
|
DoFunc func(req *http.Request) (*http.Response, error)
|
|
}
|
|
|
|
// Do is the mock client's version
|
|
func (m *Client) Do(req *http.Request) (*http.Response, error) {
|
|
return m.DoFunc(req)
|
|
}
|