Close all goroutines when HTTP request is cancelled
问题 I am making a web crawler. I'm passing the url through a crawler function and parsing it to get all the links in the anchor tag, then I am invoking same crawler function for all those urls using seperate goroutine for every url. But if if send a request and cancel it before I get the response, all the groutines for that particular request are still running. Now what I want is that when I cancel the request all the goroutines that got invoked due to that request stops. Please guide. Following