rclone/vendor/github.com/jlaffaye/ftp/debug.go

22 lines
360 B
Go
Raw Normal View History

2019-04-30 16:07:37 +00:00
package ftp
import "io"
type debugWrapper struct {
conn io.ReadWriteCloser
io.Reader
io.Writer
}
func newDebugWrapper(conn io.ReadWriteCloser, w io.Writer) io.ReadWriteCloser {
return &debugWrapper{
Reader: io.TeeReader(conn, w),
Writer: io.MultiWriter(w, conn),
conn: conn,
}
}
func (w *debugWrapper) Close() error {
return w.conn.Close()
}