Skip to content

Commit

Permalink
Fix Typos in Context (#822)
Browse files Browse the repository at this point in the history
* Remove incorrect sentence.

* Fix typo referencing incorrect identifier
  • Loading branch information
KMankowski authored Nov 22, 2024
1 parent 51affc7 commit 43d6aef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type Store interface {
}
```

We will need to adjust our spy so it takes some time to return `data` and a way of knowing it has been told to cancel. We'll also rename it to `SpyStore` as we are now observing the way it is called. It'll have to add `Cancel` as a method to implement the `Store` interface.
We will need to adjust our spy so it takes some time to return `data` and a way of knowing it has been told to cancel. It'll have to add `Cancel` as a method to implement the `Store` interface.

```go
type SpyStore struct {
Expand Down Expand Up @@ -144,7 +144,7 @@ func Server(store Store) http.HandlerFunc {
}
```

This makes this test pass but it doesn't feel good does it! We surely shouldn't be cancelling `Store` before we fetch on _every request_.
This makes this test pass but it doesn't feel good does it! We surely shouldn't be cancelling `Cancel()` before we fetch on _every request_.

By being disciplined it highlighted a flaw in our tests, this is a good thing!

Expand Down

0 comments on commit 43d6aef

Please sign in to comment.