This commit is contained in:
sm
2016-06-02 23:19:06 -07:00
committed by sm
commit 00dc1cea19
3 changed files with 52 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package trash
import "io"
func init() {
Reader = &reader{}
}
// Reader provides a steady stream of trash (non-random bytes) when read from
var Reader io.Reader
type reader struct{}
func (r *reader) Read(p []byte) (int, error) {
c := 0
for i := 0; i < len(p); i++ {
c++
p[i] = 0xca
}
return c, nil
}