...

/

Solution 5: Go Concurrency

Solution 5: Go Concurrency

Let’s solve the challenge set in the previous lesson.

We'll cover the following...

Solution

To modify wPools.go so that each worker implements the functionality of wc(1), we can replace the calculation of the square with a call to the wc command-line tool using Go’s built-in os/exec package.

Here’s the modified code:

Access this course and 1400+ top-rated courses and projects.