Using recover with goroutines
This lesson covers the advantages of recovering when using goroutines and how it doesn't affect the rest of the program.
We'll cover the following...
Recovering with goroutines
One application of recover
is to shut down a failing goroutine inside a server without killing the other executing goroutines.
func server(workChan <-chan *Work) {
for work := range workChan {
go safelyDo(work) // start the goroutine for
...