Fix Typos in Context (#822)

* Remove incorrect sentence.

* Fix typo referencing incorrect identifier
This commit is contained in:
Kevin Mankowski 2024-11-22 09:09:55 -05:00 committed by GitHub
parent 51affc7c16
commit 43d6aef20a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {
@ -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!