copyLoop without sync.WaitGroup
Small refactoring without affecting functionality. Pros:
- -1 goroutine
- no need for sync.WaitGroup
I'm closing a and b parameters as original code did, however every call site of copyLoop
closing them as well though without error check. So closing a and b in copyLoop
can be omitted (same as io.Copy never closes its args).