mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
pkg/ioutils: deprecate WriteCounter, NewWriteCounter
it was moved to pkg/ioutils inc30a55f14d, and only had a single use at the time in [engine/Env.WriteTo]. That use was removed in531f4122bd, 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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user