Creating Multiple Files with Goroutines
Let’s learn how to use goroutines to create multiple files with random data using a Go command-line utility.
We'll cover the following...
The randomFiles.go
utility
As a practical example of the use of goroutines, this lesson presents a command-line utility that creates multiple files populated with randomly generated data—such files can be used for testing file systems or generating data used for testing.
Coding example
The crucial code of randomFiles.go
is the following:
Access this course and 1400+ top-rated courses and projects.