mirror of
https://github.com/rclone/rclone.git
synced 2024-11-30 04:15:26 +01:00
22 lines
360 B
Go
22 lines
360 B
Go
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()
|
|
}
|