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!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Brandon Atkinson
Brandon Atkinson

Written by Brandon Atkinson

A software engineer who really enjoys learning new tech! Connect with me on LinkedIn: https://tinyurl.com/y5eb48gm or GitHub: https://github.com/atkinsonbg

Responses (1)

Write a response