|
@@ -1,6 +1,9 @@
|
|
|
package zioutil
|
|
|
|
|
|
-import "io"
|
|
|
+import (
|
|
|
+ "fmt"
|
|
|
+ "io"
|
|
|
+)
|
|
|
|
|
|
type ReadWriterBind struct {
|
|
|
Reader io.Reader
|
|
@@ -70,3 +73,10 @@ type NullWriter struct {
|
|
|
func (nw NullWriter) Write(b []byte) (int, error) {
|
|
|
return len(b), nil
|
|
|
}
|
|
|
+
|
|
|
+type NullReader struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (nw NullReader) Read(b []byte) (int, error) {
|
|
|
+ return 0, fmt.Errorf("null reader")
|
|
|
+}
|