Recently I came across a scenario where I needed to execute some long running functions and capture the results for later use. Of course to reduce the latency of this code I ran the functions concurrently with goroutines and a waitgroup. The kicker here was that to return the results from the goroutines I had to use channels and getting the complete data from the channel was more complex than I thought.
Unless you’ve been living under a rock (or a monolith, badum tish!) for the past couple of years, you will have heard the term microservices at some point. Chances are you, or someone you know, are developing microservices. Sure it can be deceptively simple to get started, choose a bounded context, knock up a REST API and away you go, right? Well, no.