aboutsummaryrefslogtreecommitdiffstats
path: root/modules/util
diff options
context:
space:
mode:
Diffstat (limited to 'modules/util')
-rw-r--r--modules/util/io.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/util/io.go b/modules/util/io.go
index eb200c9f9a..b3dde9d1f6 100644
--- a/modules/util/io.go
+++ b/modules/util/io.go
@@ -9,6 +9,12 @@ import (
"io"
)
+type NopCloser struct {
+ io.Writer
+}
+
+func (NopCloser) Close() error { return nil }
+
// ReadAtMost reads at most len(buf) bytes from r into buf.
// It returns the number of bytes copied. n is only less than len(buf) if r provides fewer bytes.
// If EOF or ErrUnexpectedEOF occurs while reading, err will be nil.