Skip to content

Commit

Permalink
Update features.md
Browse files Browse the repository at this point in the history
Make the function signature in the RunAndReturn example match that of the Requester interface just above it.
  • Loading branch information
dlwyatt committed Apr 1, 2024
1 parent f500645 commit 9820fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ A `RunAndReturn` method is also available on the expecter struct that allows you
```go
requesterMock.EXPECT().
Get(mock.Anything).
RunAndReturn(func(path string) string {
RunAndReturn(func(path string) (string, error) {
fmt.Println(path, "was called")
return "result for " + path
return ("result for " + path), nil
})
```

Expand Down

0 comments on commit 9820fbb

Please sign in to comment.