You don't need to create a temporary array outside the goroutines. body := make([]string, 11) // Make up a temporary array to hold the data to be written to the file
Just create a local variable of string within the go routine.
And if you do, you shouldn't be writing to them in parallel from multiple go routines. Its not thread safe.
Otherwise, its a good write up. Thanks for sharing.
You don't need to create a temporary array outside the goroutines.
body := make([]string, 11) // Make up a temporary array to hold the data to be written to the file
Just create a local variable of string within the go routine.
And if you do, you shouldn't be writing to them in parallel from multiple go routines. Its not thread safe.
Otherwise, its a good write up. Thanks for sharing.