Thanks for the feedback. Yes, ErrGroup is absolutely a way to go: https://www.oreilly.com/content/run-strikingly-fast-parallel-file-searches-in-go-with-sync-errgroup/

That being said, this post was not meant to be the definitive guide to concurrent calls in Go, just one option. However, using the anonymous functions, I think we could easily handle any HTTP errors that would result. Would just need to refactor the code so my API call functions returned an error, vs passing in my object.

Thanks again!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store