🔗 The sync package
Michael prepared a great overview of the sync and x/sync packages, which implement concurrency related facilities (concurrency is hard with either classical approaches or CSP, as we learned from a presentation last year at meetup #2).
One thing that the errgroup will not provide for out of the box is the pickup of multiple error, should more than one occur.
Go calls the given function in a new goroutine. The first call to return a non-nil error cancels the group; its error will be returned by Wait. – https://godoc.org/golang.org/x/sync/errgroup#Group.Go
Wait blocks until all function calls from the Go method have returned, then returns the first non-nil error (if any) from them. – https://godoc.org/golang.org/x/sync/errgroup#Group.Wait
Package singleflight provides a duplicate function call suppression mechanism.
The way to test singleflight can be interesting, too. One pools up a number of goroutines (by starting and waiting a bit). Then, a single value sent on a channel serves as a starting shot. At the same time, the atomic counter on calls ensure there has only been a single function call.
In one of the upcoming meetups, we will highlight tools from the Hashicorp stack, as there is certainly in interest in these tools.
Go can be a glue language, e.g. to combine exiting, tested tools with some thin convenience layer. On a lighter side, this is what ttarc does, a TikTok archiving tool: It wraps wget with a bit of networking and JSON parsing to generate WARC files.