In the Select chapter, after adding the error in the return from Racer we need to also update our original test to handle the error, else when we run the tests we will see:
/racer_test.go:24:16: assignment mismatch: 1 variable but Racer returns 2 values
Given we do nothing with it until later on, handling with _ makes the most sense.
I've included the initial test in full to demonstrate the change, and added a note for the reader to explain why this change needs to be made.
In the Select chapter, after adding the
error
in the return fromRacer
we need to also update our original test to handle the error, else when we run the tests we will see:Given we do nothing with it until later on, handling with
_
makes the most sense.I've included the initial test in full to demonstrate the change, and added a note for the reader to explain why this change needs to be made.