Challenge 04 - Goroutines and WaitGroups! Image Challenge 04 - Goroutines and WaitGroups!

In Go, goroutines and WaitGroups are without a doubt some of the best features of the language. They enable us to more easily write highly concurrent applications that are vastly more efficient and quicker than their synchronous counterparts.


In this challenge, we will be creating a REST API that does the job of hitting a number of API endpoints and returning an aggregated response back to the requester. In order to successfully complete this, you will have to leverage goroutines within your endpoint function and ensure that every request is completed before returning a response to the requester.

Acceptance Criteria

In order to successfully complete this challenge, your project will have to:

Create a simple REST API in Go that calls out to the PokeAPI and orders the height of these 5 pokemon:

  • ditto
  • charizard
  • weedle
  • mew
  • bulbasaur

The PokeAPI documentation can be found here: PokeAPI

Key Concepts

By completing this challenge:

  • You will gain an insight into the basics of goroutines and how you can handle premature termination of your functions using WaitGroups
  • You will learn how to request and parse JSON from an external HTTP API

Completing the Challenge

In order to complete the challenge, fork the elliotforbes/go-challenges repository into your own GitHub account.

Next, create a directory within that repo for each of the challenges you attempt! This will give you a super handy repo that will contain excellent references for your own future Go projects!

Helpful Tutorials


Congratulations! You have successfully completed the 4th TutorialEdge Go Challenge!

Elliot Forbes

Elliot Forbes
Twitter: @Elliot_f

Hey, I'm Elliot and I've been working on TutorialEdge for the last 4 years! If my work has helped you in any way, shape, or form then please consider supporting my work.

become a patron Buy Me A Coffee