Consider the following Go program: package mainimport ( “…
Consider the following Go program: package mainimport ( “fmt” “time”)func doSomething(s string) { fmt.Println(s) time.Sleep(100 * time.Millisecond)}func main() { letters := []string{“a”, “b”, “c”, “d”, “e”} for _, s := range letters { go doSomething(s) }} The program waits for all of the goroutines in the program to finish and prints out all strings in the letters slice.