Skip to content

Commit

Permalink
fix typo in select.md (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemvarakin authored Sep 28, 2023
1 parent 8e2d36a commit 3252bc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions select.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func TestRacer(t *testing.T) {
fastURL := fastServer.URL

want := fastURL
got, _ := Racer(slowURL, fastURL)
got, err := Racer(slowURL, fastURL)

if err != nil {
t.Fatalf("did not expect an error but got one %v", err)
Expand Down Expand Up @@ -319,7 +319,7 @@ func Racer(a, b string) (winner string, error error) {
Change the signature of `Racer` to return the winner and an `error`. Return `nil` for our happy cases.
The compiler will complain about your _first test_ only looking for one value so change that line to `got, _ := Racer(slowURL, fastURL)`, knowing that we should check we _don't_ get an error in our happy scenario.
The compiler will complain about your _first test_ only looking for one value so change that line to `got, err := Racer(slowURL, fastURL)`, knowing that we should check we _don't_ get an error in our happy scenario.
If you run it now after 11 seconds it will fail.
Expand Down

0 comments on commit 3252bc6

Please sign in to comment.