Skip to content

Commit de54347

Browse files
committed
cli/command: remove deprecated CopyToFile utility
It was deprecated in 7cc6b8e, which is part of v28.x Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent b01d359 commit de54347

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

‎cli/command/utils.go‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,10 @@ import (
1414
"github.com/docker/cli/cli/streams"
1515
"github.com/docker/cli/internal/prompt"
1616
"github.com/moby/moby/api/types/filters"
17-
"github.com/moby/sys/atomicwriter"
1817
"github.com/pkg/errors"
1918
"github.com/spf13/pflag"
2019
)
2120

22-
// CopyToFile writes the content of the reader to the specified file
23-
//
24-
// Deprecated: use [atomicwriter.New].
25-
func CopyToFile(outfile string, r io.Reader) error {
26-
writer, err := atomicwriter.New(outfile, 0o600)
27-
if err != nil {
28-
return err
29-
}
30-
defer writer.Close()
31-
_, err = io.Copy(writer, r)
32-
return err
33-
}
34-
3521
const ErrPromptTerminated = prompt.ErrTerminated
3622

3723
// DisableInputEcho disables input echo on the provided streams.In.

0 commit comments

Comments
 (0)