Skip to content

Commit

Permalink
Merge pull request #154 from g1stavo/docs/add-missing-return
Browse files Browse the repository at this point in the history
feat: add missing return to README example
  • Loading branch information
mefellows authored May 29, 2021
2 parents eb10d18 + f0d0443 commit bd39399
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestConsumer(t *testing.T) {
u := fmt.Sprintf("http://localhost:%d/foobar", pact.Server.Port)
req, err := http.NewRequest("GET", u, strings.NewReader(`{"name":"billy"}`))
if err != nil {
return err
return
}

// NOTE: by default, request bodies are expected to be sent with a Content-Type
Expand All @@ -184,9 +184,8 @@ func TestConsumer(t *testing.T) {
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer 1234")

if _, err = http.DefaultClient.Do(req); err != nil {
return err
}
_, err = http.DefaultClient.Do(req)
return
}

// Set up our expected interactions.
Expand Down

0 comments on commit bd39399

Please sign in to comment.