mirror of
https://github.com/quii/learn-go-with-tests.git
synced 2025-12-08 20:36:07 +00:00
Fix Typos in Context (#822)
* Remove incorrect sentence. * Fix typo referencing incorrect identifier
This commit is contained in:
parent
51affc7c16
commit
43d6aef20a
@ -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!
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user