jarcoal / httpmock

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

Fix wrong argument order in RegisterResponder example #52

Closed tarotaro0 closed 5 years ago

tarotaro0 commented 5 years ago

What

Fix wrong argument order in RegisterResponder example.

Why

When I saw godoc, I was a little bit confused because the RegisterResponder example is :

func TestFetchArticles(t *testing.T) {
    ...

    httpmock.RegisterResponder("GET", "http://example.com/",
        httpmock.NewStringResponder("hello world", 200))

        ...
}

but NewStringResponder is :

func NewStringResponder(status int, body string) Responder