jarcoal / httpmock

HTTP mocking for Golang
http://godoc.org/github.com/jarcoal/httpmock
MIT License
1.93k stars 103 forks source link

Error Responder #12

Closed MarcoVigna17 closed 7 years ago

MarcoVigna17 commented 8 years ago

Hi all guys!

I'm using your httpmock in a project, and I found it very clear and useful. I like it, and I will use it also in the future on other projects.

I'm using it to mock http.Client, and I need to mock an error responder.

There's a way to do in on the actual version? Or will be in future releases?

Cheers

dlebech commented 7 years ago

@MarcoVigna17 I'm assuming that you mean that you want an easy way to create a responder that creates an error rather than a response. Something like this: responder := NewErrorResponder(errors.New("my error"))

If that's what you're looking for, it's being added in #25 :)

MarcoVigna17 commented 7 years ago

Yes was that!

Thanks! :)

dlebech commented 7 years ago

@MarcoVigna17 glad to hear it :smiley: I'll close this issue then.