func RunParallel(loader <-chan TestSuite, reporter Reporter, runSuite RunSuiteFunc, numRoutines int) {
	resultConsumer := make(chan []TestResult)
	var wg sync.WaitGroup
	wg.Add(numRoutines)
	for i := 0; i < numRoutines; i++ {
		go runSuites(loader, resultConsumer, &wg, runSuite)
	}
	go func() {
		wg.Wait()
		close(resultConsumer)
	}()
	for {
		results, more := <-resultConsumer
		reporter.Report(results)
		if !more {
			break
		}
	}
	reporter.Flush()
}
RunParallel starts parallel routines to execute test suites received from loader channel
package main
import (
	"sync"
)
type RunSuiteFunc func(suite TestSuite) []TestResult