We need to be sure our Camp function calls the Fire value’s Extinguish method before the program exits. But right now, Camp is returning early due to an error, before Extinguish can be called.
We don’t want to leave a lit Fire unattended in the forest! Revise the Camp function so that Extinguish is always called, even if Camp returns early.
Actual Output:
Fire lit: true
Error: spotted a bear
Desired Output:
Fire lit: true
Fire lit: false
Error: spotted a bear
Go through the following code samples, and predict what their output will be. No need to predict all the details of the stack traces; focus on determining which fmt.Println calls will get made, and in what order.