portald/warp/copy.go

18 lines
278 B
Go
Raw Normal View History

2023-06-07 17:43:58 -05:00
package warp
import "io"
func R2WF(x io.Reader) func(io.Writer) error {
return func(w io.Writer) error {
_, err := io.Copy(w, x)
return err
}
}
func W2RF(w io.Writer) func(io.Reader) error {
return func(r io.Reader) error {
_, err := io.Copy(w, r)
return err
}
}