👩💻 Join our community of thousands of amazing developers!
Hello! Today we will learn what is WaitGroup in golang and we will look how to apply them on an example of the program for files search. WaitGroup is waiting for the completion of go routines. The main go routine calls the Add method, and then each go routine calls the Done method when the routine ends. Let’s start with the findFile method. In this method we read all files and directories in the root folder....