18 lines
278 B
Go
18 lines
278 B
Go
|
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
|
||
|
}
|
||
|
}
|