func NewWaitGroup(size int) *WaitGroup {
	wg := &WaitGroup{
		size: size,
	}
	if size > 0 {
		wg.pool = make(chan byte, size)
	}
	return wg
}
NewWaitGroup creates a waitgroup with a specific size (the maximum number of
goroutines to run at the same time). If you use -1 as the size, all items
will run concurrently (just like a normal sync.WaitGroup)
package waitgroup
import (
	"sync"
)
type WaitGroup struct {
	size      int
	pool      chan byte
	waitCount int64
	waitGroup sync.WaitGroup
}