devnull.go 287 B

12345678910111213
  1. package execext
  2. import (
  3. "io"
  4. )
  5. var _ io.ReadWriteCloser = devNull{}
  6. type devNull struct{}
  7. func (devNull) Read(p []byte) (int, error) { return 0, io.EOF }
  8. func (devNull) Write(p []byte) (int, error) { return len(p), nil }
  9. func (devNull) Close() error { return nil }