mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
55bebbaecf
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
17 lines
323 B
Go
17 lines
323 B
Go
package testutil // import "github.com/docker/docker/internal/testutil"
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// DevZero acts like /dev/zero but in an OS-independent fashion.
|
|
var DevZero io.Reader = devZero{}
|
|
|
|
type devZero struct{}
|
|
|
|
func (d devZero) Read(p []byte) (n int, err error) {
|
|
for i := range p {
|
|
p[i] = 0
|
|
}
|
|
return len(p), nil
|
|
}
|