File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,28 @@ func newCountingReader(r io.Reader) *countingReader {
119
119
120
120
type countingReadCloser struct {
121
121
* countingReader
122
- io.Closer
122
+ readCloser io.ReadCloser
123
123
}
124
124
125
125
func newCountingReadCloser (rc io.ReadCloser ) * countingReadCloser {
126
126
return & countingReadCloser {
127
127
countingReader : newCountingReader (rc ),
128
- Closer : rc ,
128
+ readCloser : rc ,
129
129
}
130
130
}
131
+
132
+ func (c countingReadCloser ) Close () error {
133
+ return c .readCloser .Close ()
134
+ }
135
+
136
+ func (c countingReadCloser ) WrappedReadCloser () io.ReadCloser {
137
+ return c .readCloser
138
+ }
139
+
140
+ // ReadCloserWrapper allows access to an underlying ReadCloser from a wrapper.
141
+ type ReadCloserWrapper interface {
142
+ io.ReadCloser
143
+ WrappedReadCloser () io.ReadCloser
144
+ }
145
+
146
+ var _ ReadCloserWrapper = & countingReadCloser {}
You can’t perform that action at this time.
0 commit comments