Mohamed Elsherif

54%
Flag icon
There’s a handy trick we can use during testing: if instead of returning from main in the event of cancellation, we execute a call to panic, then the runtime will dump the stack of every goroutine in the program. If the main goroutine is the only one left, then it has cleaned up after itself.
The Go Programming Language
Rate this book
Clear rating
Open Preview