cmd/docker: remove deprecated io/ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-02-25 15:31:22 +01:00
Родитель 86db51e86e
Коммит 0e3197ebd4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 76698F39D527CE8C
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -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)