18 lines
268 B
Go
18 lines
268 B
Go
|
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
|
||
|
|
||
|
package transport
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
)
|
||
|
|
||
|
type Pipe struct {
|
||
|
Reader io.ReadCloser
|
||
|
Writer io.WriteCloser
|
||
|
}
|
||
|
|
||
|
func NewPipe() *Pipe {
|
||
|
r,w := io.Pipe()
|
||
|
return &Pipe{ Reader: r, Writer: w }
|
||
|
}
|