portald/floppy/floppy.go
2023-06-07 18:43:58 -04:00

21 lines
274 B
Go

package floppy
import (
"io"
"golang.org/x/sync/errgroup"
)
func Floppy(a, b io.ReadWriter) error {
var g errgroup.Group
g.Go(func() error {
_, err := io.Copy(a, b)
return err
})
g.Go(func() error {
_, err := io.Copy(b, a)
return err
})
return g.Wait()
}