From 0e3197ebd4c378762205c39121e9b2b8ff4dbeae Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Feb 2022 15:31:22 +0100 Subject: [PATCH] cmd/docker: remove deprecated io/ioutil Signed-off-by: Sebastiaan van Stijn --- cmd/docker/docker_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/docker/docker_test.go b/cmd/docker/docker_test.go index 0acca1b6b1..fc1c5829bd 100644 --- a/cmd/docker/docker_test.go +++ b/cmd/docker/docker_test.go @@ -3,7 +3,6 @@ package main import ( "bytes" "io" - "io/ioutil" "os" "testing" @@ -30,7 +29,7 @@ func TestClientDebugEnabled(t *testing.T) { assert.Check(t, is.Equal(logrus.DebugLevel, logrus.GetLevel())) } -var discard = ioutil.NopCloser(bytes.NewBuffer(nil)) +var discard = io.NopCloser(bytes.NewBuffer(nil)) func runCliCommand(t *testing.T, r io.ReadCloser, w io.Writer, args ...string) error { t.Helper() @@ -38,7 +37,7 @@ func runCliCommand(t *testing.T, r io.ReadCloser, w io.Writer, args ...string) e r = discard } if w == nil { - w = ioutil.Discard + w = io.Discard } cli, err := command.NewDockerCli(command.WithInputStream(r), command.WithCombinedStreams(w)) assert.NilError(t, err)