1
0
mirror of https://github.com/fatedier/frp.git synced 2025-06-07 08:48:22 +00:00
2017-11-01 16:21:57 +08:00

18 lines
377 B
Go

package http
import (
"github.com/stretchr/testify/mock"
"net/http"
)
// TestRoundTripper DEPRECATED USE net/http/httptest
type TestRoundTripper struct {
mock.Mock
}
// RoundTrip DEPRECATED USE net/http/httptest
func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
args := t.Called(req)
return args.Get(0).(*http.Response), args.Error(1)
}