pkg/ioutils: deprecate WriteCounter, NewWriteCounter

it was moved to pkg/ioutils in c30a55f14d,
and only had a single use at the time in [engine/Env.WriteTo]. That use
was removed in 531f4122bd, which removed
the engine package.

[engine/Env.WriteTo]: c30a55f14d/engine/env.go (L260-L264)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-01-09 16:48:39 +01:00
parent 60971a66b4
commit 383503d382

View File

@@ -55,12 +55,16 @@ func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser {
// of bytes written to the writer during a "session".
// This can be convenient when write return is masked
// (e.g., json.Encoder.Encode())
//
// Deprecated: this type is no longer used and will be removed in the next release.
type WriteCounter struct {
Count int64
Writer io.Writer
}
// NewWriteCounter returns a new WriteCounter.
//
// Deprecated: this function is no longer used and will be removed in the next release.
func NewWriteCounter(w io.Writer) *WriteCounter {
return &WriteCounter{
Writer: w,