Last time I introduced the SetLimit feature of the errgroup package. But this feature is not sufficient if you ever ant to set some sort of shared or global limit on the number of jobs doing a task. For a more general-purpose rate limiting mechanism, I often reach for the x/sync/semaphore package. Let’s modify the example from last time, to introduce a global limit using this library: import ( // other impots "golang.