gatus/test/mock.go

10 lines
192 B
Go
Raw Permalink Normal View History

package test
import "net/http"
type MockRoundTripper func(r *http.Request) *http.Response
func (f MockRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
return f(r), nil
}