mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 01:44:43 +01:00
15 lines
450 B
Go
15 lines
450 B
Go
|
// package devnoop provides an io.ReadWriteCloser that never errors
|
||
|
// and always reports reads / writes to / from buffers as complete.
|
||
|
// The buffers themselves are never touched.
|
||
|
package devnoop
|
||
|
|
||
|
type Dev struct{}
|
||
|
|
||
|
func Get() Dev {
|
||
|
return Dev{}
|
||
|
}
|
||
|
|
||
|
func (Dev) Write(p []byte) (n int, err error) { return len(p), nil }
|
||
|
func (Dev) Read(p []byte) (n int, err error) { return len(p), nil }
|
||
|
func (Dev) Close() error { return nil }
|