Commit 0e1e73b
committed
Remove ioutils.CountWriter
We had 2 implementations to keep track of how long an io.Reader is:
ioutils.CountWriter and ioutils.PositionTrackerReader.
ioutils.CountWriter implements io.Writer, but it just discards the bytes
and keeps track of the number of bytes written. The caller connects it
to an existing io.Reader by creating an io.TeeReader which writes to it
whenever the original reader is read.
ioutils.PositionTrackerReader is a simpler interface that wraps an
existing io.Reader and proxies Read requests while updating it's
internal position.
This change removes CountWriter in favor of the simpler and better
tested PositionTrackerReader.
Signed-off-by: Kern Walster <[email protected]>1 parent 3510a96 commit 0e1e73b
2 files changed
+3
-58
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
151 | 150 | | |
152 | 151 | | |
153 | | - | |
| 152 | + | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
160 | | - | |
| 159 | + | |
161 | 160 | | |
162 | 161 | | |
163 | 162 | | |
| |||
This file was deleted.
0 commit comments