1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-01-07 12:38:05 +00:00

httpdriver: Fix MockResponse not impl'ing Response

This commit is contained in:
diamondburned 2022-12-08 19:42:22 -08:00
parent bf75621068
commit ea4beab6bd
No known key found for this signature in database
GPG key ID: D78C4471CE776659

View file

@ -10,6 +10,11 @@ import (
"reflect"
)
var (
_ Request = (*MockRequest)(nil)
_ Response = (*MockResponse)(nil)
)
// MockRequest is a mock request. It implements the Request interface.
type MockRequest struct {
Method string
@ -162,10 +167,10 @@ func (r *MockResponse) GetStatus() int {
return r.StatusCode
}
func (r *MockRequest) GetHeader() http.Header {
func (r *MockResponse) GetHeader() http.Header {
return r.Header
}
func (r *MockRequest) GetBody() io.ReadCloser {
func (r *MockResponse) GetBody() io.ReadCloser {
return io.NopCloser(bytes.NewReader(r.Body))
}