Skip to content

Commit

Permalink
readme fix: ResponseReader is interface, doesn't need ptr (#310)
Browse files Browse the repository at this point in the history
Following this code example as-is results in an error because `reader` is a pointer to an interface instead of just an interface. This fixes it.
  • Loading branch information
bgentry authored Sep 9, 2024
1 parent daecde7 commit 9f458ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func TestWithCustomBackend(t *testing.T) {

type customBackend struct {}
// Implement the Backend interface
func (b *customBackend) Call(ctx context.Context, r *clerk.APIRequest, reader *clerk.ResponseReader) error {
func (b *customBackend) Call(ctx context.Context, r *clerk.APIRequest, reader clerk.ResponseReader) error {
// Construct a clerk.APIResponse and use the reader's Read method.
reader.Read(&clerk.APIResponse{})
}
Expand Down

0 comments on commit 9f458ce

Please sign in to comment.